-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5.3.8
- Loading branch information
Showing
48 changed files
with
85 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 24 additions & 32 deletions
56
packages/invertible-theme/src/Buttons/ThemeModeButtonGroup.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,34 @@ | ||
import { | ||
Button, ButtonGroup, Chip, Stack, | ||
} from '@mui/material' | ||
import type { ButtonGroupProps } from '@mui/material' | ||
import { Button, ButtonGroup } from '@mui/material' | ||
import React from 'react' | ||
|
||
import { useColorSchemeEx } from '../InvertibleMuiThemeProvider/index.ts' | ||
|
||
export const ThemeModeButtonGroup: React.FC = () => { | ||
export const ThemeModeButtonGroup: React.FC<ButtonGroupProps> = (props) => { | ||
const { | ||
darkMode, lightMode, systemMode, mode, setMode, | ||
darkMode, lightMode, systemMode, setMode, | ||
} = useColorSchemeEx() | ||
|
||
return ( | ||
<Stack direction="column" gap={2} alignItems="start"> | ||
<Stack direction="row" gap={2}> | ||
Current Mode: | ||
{' '} | ||
<Chip label={mode} /> | ||
</Stack> | ||
<ButtonGroup> | ||
<Button | ||
variant={darkMode ? 'contained' : 'outlined'} | ||
onClick={() => setMode('dark')} | ||
> | ||
Dark Mode | ||
</Button> | ||
<Button | ||
variant={lightMode ? 'contained' : 'outlined'} | ||
onClick={() => setMode('light')} | ||
> | ||
Light Mode | ||
</Button> | ||
<Button | ||
variant={systemMode ? 'contained' : 'outlined'} | ||
onClick={() => setMode('system')} | ||
> | ||
System | ||
</Button> | ||
</ButtonGroup> | ||
</Stack> | ||
<ButtonGroup {...props}> | ||
<Button | ||
variant={darkMode ? 'contained' : 'outlined'} | ||
onClick={() => setMode('dark')} | ||
> | ||
Dark Mode | ||
</Button> | ||
<Button | ||
variant={lightMode ? 'contained' : 'outlined'} | ||
onClick={() => setMode('light')} | ||
> | ||
Light Mode | ||
</Button> | ||
<Button | ||
variant={systemMode ? 'contained' : 'outlined'} | ||
onClick={() => setMode('system')} | ||
> | ||
System | ||
</Button> | ||
</ButtonGroup> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
5 changes: 2 additions & 3 deletions
5
.../invertible-theme/src/InvertibleTheme.tsx → ...vertibleThemeProvider/InvertibleTheme.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import type { ThemeOptions } from '@mui/material' | ||
|
||
interface InvertibleTheme { | ||
/** @deprecated switch to InvertibleMuiThemeProvider which does not require this */ | ||
export interface InvertibleTheme { | ||
darkOptions?: ThemeOptions | ||
lightOptions?: ThemeOptions | ||
options: ThemeOptions | ||
} | ||
|
||
export type { InvertibleTheme } |
6 changes: 6 additions & 0 deletions
6
packages/invertible-theme/src/LegacyInvertibleThemeProvider/InvertibleThemeContext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createContext } from 'react' | ||
|
||
import type { InvertibleTheme } from './InvertibleTheme.tsx' | ||
|
||
/** @deprecated switch to InvertibleMuiThemeProvider which does not require this */ | ||
export const InvertibleThemeContext = createContext<InvertibleTheme>({ options: {} }) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/invertible-theme/src/LegacyInvertibleThemeProvider/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from './InvertibleTheme.tsx' | ||
export * from './InvertibleThemeContext.tsx' | ||
export * from './InvertibleThemeProvider.tsx' | ||
export * from './InvertibleThemeProviderProps.ts' | ||
export * from './use.ts' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
export * from './Buttons/index.ts' | ||
export * from './InvertibleMuiThemeProvider/index.ts' | ||
export * from './InvertibleTheme.tsx' | ||
export * from './InvertibleThemeContext.tsx' | ||
export * from './InvertibleThemeProvider.tsx' | ||
export * from './InvertibleThemeProviderProps.ts' | ||
export * from './use.ts' | ||
export * from './LegacyInvertibleThemeProvider/index.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.