-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from tblivet/feat/add_css_variables
Rework variables section to highlight CSS variables
- Loading branch information
Showing
8 changed files
with
525 additions
and
142 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,106 @@ | ||
import { useEffect } from '@storybook/client-api'; | ||
import { Meta, Story, Canvas } from '@storybook/addon-docs'; | ||
import styles from './variables.scss' | ||
import { | ||
renderPrimaryColors, | ||
renderRedColors, | ||
renderYellowColors, | ||
renderGreenColors, | ||
renderBlueColors, | ||
renderOceanBlueColors, | ||
renderPurpleColors, | ||
renderAmberColors, | ||
renderCommonColors | ||
} from './variables'; | ||
|
||
<Meta title="CSS Variables/Colors" /> | ||
|
||
# Primary | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Primary" | ||
> | ||
{() => renderPrimaryColors()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Red | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Red" | ||
> | ||
{() => renderRedColors()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Yellow | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Yellow" | ||
> | ||
{() => renderYellowColors()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Green | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Green" | ||
> | ||
{() => renderGreenColors()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Blue | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Blue" | ||
> | ||
{() => renderBlueColors()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Ocean blue | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Ocean blue" | ||
> | ||
{() => renderOceanBlueColors()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Purple | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Purple" | ||
> | ||
{() => renderPurpleColors()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Amber | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Amber" | ||
> | ||
{() => renderAmberColors()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Common | ||
|
||
<Canvas withSource="none"> | ||
<Story | ||
name="Common" | ||
> | ||
{() => renderCommonColors()} | ||
</Story> | ||
</Canvas> |
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,39 @@ | ||
import { useEffect } from '@storybook/client-api'; | ||
import { Meta, Story, Canvas } from '@storybook/addon-docs'; | ||
import styles from './variables.scss' | ||
import { | ||
renderPrimaryFont, | ||
renderSecondaryFont, | ||
renderFontSizes | ||
} from './variables'; | ||
|
||
<Meta title="CSS Variables/Fonts" /> | ||
|
||
# Primary | ||
<Canvas withSource="none"> | ||
<Story | ||
name="Primary" | ||
> | ||
{() => renderPrimaryFont()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Secondary | ||
_NOTE: The secondary font is the same as the primary font._ | ||
<Canvas withSource="none"> | ||
<Story | ||
name="Secondary" | ||
> | ||
{() => renderSecondaryFont()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Font size | ||
<Canvas withSource="none"> | ||
<Story | ||
name="Size" | ||
> | ||
{() => renderFontSizes()} | ||
</Story> | ||
</Canvas> | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
import { useEffect } from '@storybook/client-api'; | ||
import { Meta, Story, Canvas } from '@storybook/addon-docs'; | ||
import styles from './variables.scss' | ||
import { | ||
renderBoxShadows, | ||
renderSizes | ||
} from './variables'; | ||
|
||
<Meta title="CSS Variables/Others" /> | ||
|
||
# Shadows | ||
<Canvas withSource="none"> | ||
<Story | ||
name="Shadows" | ||
> | ||
{() => renderBoxShadows()} | ||
</Story> | ||
</Canvas> | ||
|
||
# Sizes | ||
<Canvas withSource="none"> | ||
<Story | ||
name="Spaces" | ||
> | ||
{() => renderSizes()} | ||
</Story> | ||
</Canvas> |
Oops, something went wrong.