-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added docs for brand colour palette (#24)
- Loading branch information
Showing
2 changed files
with
88 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { Meta, ColorPalette, ColorItem } from '@storybook/blocks'; | ||
import { colors, default as aliasColors } from '@/colors.ts'; | ||
|
||
<Meta title="Colors" /> | ||
|
||
# Colours | ||
|
||
Base colours provide a full colour spectrum of dark to light hues, and are used as aliases in the [brand theme](#brand-theme-and-ui-colours). | ||
|
||
## Base Colours | ||
# | ||
|
||
<ColorPalette> | ||
|
||
{Object.keys(colors).map((token, index) => { | ||
const color = colors[token]; | ||
return ( | ||
<ColorItem | ||
index={index} | ||
title={`${token}`} | ||
colors={color} | ||
/> | ||
); | ||
})} | ||
|
||
</ColorPalette> | ||
|
||
## Brand Theme and UI Colours | ||
# | ||
|
||
<ColorPalette> | ||
|
||
{Object.keys(aliasColors).map((token, index) => { | ||
const color = aliasColors[token]; | ||
if (typeof color === 'object' && !colors[token]) { | ||
return ( | ||
<ColorItem | ||
index={index} | ||
title={`${token}`} | ||
colors={color} | ||
/> | ||
) | ||
} | ||
})} | ||
|
||
</ColorPalette> | ||
|