-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Dark Mode #718
Closed
Closed
feat: Dark Mode #718
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
eb69b11
Storybook dark mode plumbing in place
lanesawyer 9152ddf
Merge branch 'main' into hackathon/dark-mode
lanesawyer eb7080f
Light and dark theme palette
lanesawyer 0e70163
Comments and TODOs
lanesawyer 589c5cd
Strongly type some objects, new TODO
lanesawyer 8166de1
Fix up reading from the theme in a storybook story
lanesawyer dcbdbfb
Use MUI type for theme, remove mode from AppTheme
lanesawyer b04c0e7
Merge branch 'main' into hackathon/dark-mode
lanesawyer cf8b16c
Light/dark backgrounds automatically in Storybook
lanesawyer 1e6b38f
feat: update defaultTheme.ts colors
hthomas-czi 871bc04
Merge branch 'main' into hackathon/dark-mode
lanesawyer 1c71d4f
Addressing PR feedback
lanesawyer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,7 +94,7 @@ export const Title - styled(Typography)` | |
```ts | ||
import { css, SerializedStyles } from "@emotion/react"; | ||
import { styled } from '@mui/material/styles'; | ||
import { getColors, getCorners } from "@czi-sds/components"; | ||
import { getColors, getSpaces } from "@czi-sds/components"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just fixing a typo in the README |
||
|
||
export const Tag = styled("div")` | ||
// This is a callback function that returns more CSS rules, but the only way | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,9 @@ export const StyledTabs = styled(TempTabs, { | |
return ` | ||
margin-top: ${isLarge ? spaces?.l : spaces?.m}px; | ||
margin-bottom: ${isLarge ? spaces?.xl : spaces?.m}px; | ||
border-bottom: ${underlined ? `2px solid ${colors?.gray[200]};` : "none"}; | ||
border-bottom: ${ | ||
underlined ? `2px solid ${props.theme.palette.divider};` : "none" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. super nice! |
||
}; | ||
`; | ||
}} | ||
`; | ||
|
@@ -89,26 +91,26 @@ export const StyledTab = styled(RawTab, { | |
// (thuang): Large Tab height is 30px, the offset is 4px | ||
height: ${isLarge ? 26 : 22}px; | ||
|
||
color: ${colors?.gray[500]}; | ||
color: ${props.theme.palette.text.secondary}; | ||
|
||
&:hover, :focus { | ||
color: black; | ||
color: ${props.theme.palette.text.primary}; | ||
} | ||
|
||
&.Mui-selected { | ||
color: black; | ||
color: ${props.theme.palette.text.primary}; | ||
|
||
&:hover { | ||
color: black; | ||
color: ${props.theme.palette.text.primary}; | ||
} | ||
} | ||
|
||
&:active { | ||
color: black; | ||
color: ${props.theme.palette.text.primary}; | ||
} | ||
|
||
&:disabled { | ||
color: ${colors?.gray[200]}; | ||
color: ${props.theme.palette.text.disabled}; | ||
} | ||
`; | ||
}} | ||
|
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Turns out I'm on the latest version of
yarn
which hasn't been used by this project yet so I was getting tons of added files fromyarn
's cache. This ensures the latestyarn
doesn't causegit
annoyances in the future 😄