This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Jb/update storybook theme #246
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2155dab
WIP config and card stories
jbouzi12 112e822
WIP setting up theme
jbouzi12 d271c0d
Correctly implement custom theme for storybook
jbouzi12 192a9d8
Tweak text styles for storybook
jbouzi12 e928360
Update storybook command and tweak global theme styles
jbouzi12 850f36f
Remove global body styles in preview-head.html
jbouzi12 ea4e0eb
Update base colors in default storybook theme
jbouzi12 67d8da8
Fix font styles in theme stories
jbouzi12 15659b0
Make <code> text devwhite in storybook
jbouzi12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<style> | ||
.sbdocs-p code, | ||
.sbdocs-li code { | ||
color: #f9fbfa !important; | ||
background-color: #5D6C74 !important; | ||
border: none !important; | ||
} | ||
</style> |
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,31 @@ | ||
import { create } from '@storybook/theming/create'; | ||
import { colorMap, FORM_ELEMENT_BORDER } from '../src/components/dev-hub/theme'; | ||
|
||
export default create({ | ||
base: 'dark', | ||
|
||
// UI | ||
appBg: colorMap.pageBackground, | ||
appContentBg: colorMap.devBlack, | ||
appBorderColor: colorMap.greyLightOne, | ||
appBorderRadius: 4, | ||
|
||
// Typography | ||
fontBase: `"Fira Mono", monospace`, | ||
|
||
// Text colors | ||
textColor: colorMap.devWhite, | ||
|
||
// Toolbar default and active colors | ||
barTextColor: colorMap.devWhite, | ||
barSelectedColor: colorMap.teal, | ||
barBg: colorMap.greyDarkThree, | ||
|
||
// Form colors | ||
inputBg: colorMap.greyDarkTwo, | ||
inputBorder: `${FORM_ELEMENT_BORDER} solid transparent`, | ||
inputTextColor: colorMap.devWhite, | ||
inputBorderRadius: 4, | ||
|
||
brandTitle: 'MongDB Dev-Hub', | ||
}); |
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 |
---|---|---|
|
@@ -12,9 +12,10 @@ import { colorMap, gradientMap, size, fontSize } from '../theme'; | |
<Story name="colors"> | ||
{() => { | ||
const Color = styled('div')` | ||
color: #fff; | ||
display: inline-block; | ||
fontfamily: 'Fira Mono', monospace; | ||
fontsize: ${fontSize.xsmall}; | ||
font-family: 'Fira Mono', monospace; | ||
font-size: ${fontSize.xsmall}; | ||
margin: ${size.medium}; | ||
width: 80px; | ||
`; | ||
|
@@ -42,8 +43,9 @@ import { colorMap, gradientMap, size, fontSize } from '../theme'; | |
<Story name="gradients"> | ||
{() => { | ||
const Wrapper = styled('div')` | ||
fontfamily: 'Fira Mono', monospace; | ||
fontsize: ${fontSize.xsmall}; | ||
color: #fff; | ||
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. Same comments as above, but I'm curious why we need to define these styles in multiple places. Shouldn't the theme be global for storybook? |
||
font-family: 'Fira Mono', monospace; | ||
font-size: ${fontSize.xsmall}; | ||
margin: ${size.medium}; | ||
`; | ||
const GradientLine = styled('div')` | ||
|
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.
What area of the storybook do these styles apply to?