-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use local styles to prevent inconsistencies (#59)
- Loading branch information
Showing
15 changed files
with
149 additions
and
162 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
19 changes: 19 additions & 0 deletions
19
libs/react/components/src/theme/get-global-color-scheme.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,19 @@ | ||
import type { DefaultPaletteRange } from "@mui/joy/styles/types"; | ||
|
||
export const getGlobalColorScheme = (palette: DefaultPaletteRange) => ({ | ||
'[data-joy-color-scheme="dark"], [data-joy-color-scheme="light"]': { | ||
"--joy-palette-primary-50": palette[50], | ||
"--joy-palette-primary-100": palette[100], | ||
"--joy-palette-primary-200": palette[200], | ||
"--joy-palette-primary-300": palette[300], | ||
"--joy-palette-primary-400": palette[400], | ||
"--joy-palette-primary-500": palette[500], | ||
"--joy-palette-primary-600": palette[600], | ||
"--joy-palette-primary-700": palette[700], | ||
"--joy-palette-primary-800": palette[800], | ||
"--joy-palette-primary-900": palette[900], | ||
"--joy-palette-primary-mainChannel": palette.mainChannel, | ||
"--joy-palette-primary-darkChannel": palette.darkChannel, | ||
"--joy-palette-primary-lightChannel": palette.lightChannel, | ||
}, | ||
}); |
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,4 +1,3 @@ | ||
export { theme } from "./theme"; | ||
export { useThemeSwitcher } from "./useThemeSwitcher"; | ||
export { getGlobalColorScheme } from "./get-global-color-scheme"; | ||
export { StopResizeAnimation } from "./stop-resize-animation"; | ||
export type { ThemeColor } from "./useThemeSwitcher"; |
Oops, something went wrong.
c1b7932
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
chair-flight – ./
chair-flight-git-main-chair-flight-team.vercel.app
chair-flight.vercel.app
chair-flight.com
chair-flight-chair-flight-team.vercel.app
www.chair-flight.com