-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add system color stories [skip release] (#102)
This PR adds initial system color token docs [category:Documentation]
- Loading branch information
1 parent
ed9b451
commit d1fca6c
Showing
13 changed files
with
570 additions
and
12 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
57 changes: 57 additions & 0 deletions
57
packages/canvas-tokens-docs/stories/system/ColorBackground.stories.mdx
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,57 @@ | ||
import {Meta, Unstyled} from '@storybook/blocks'; | ||
|
||
import { | ||
BackgroundColors, | ||
BackgroundAlternateColors, | ||
BackgroundMutedColors, | ||
BackgroundContrastColors, | ||
BackgroundStatusColors, | ||
} from "./examples/Color/Background" | ||
|
||
<Meta title="Docs/System Tokens/Color/Background" /> | ||
|
||
<Unstyled> | ||
|
||
# System Background Color Tokens | ||
|
||
System background color tokens provide values for surfaces. | ||
|
||
## Usage | ||
|
||
```ts | ||
// styles.ts | ||
import {system} from '@workday/canvas-tokens-web'; | ||
|
||
const styles = { | ||
backgroundColor: `var(${system.color.bg.default})`, | ||
}; | ||
``` | ||
|
||
```css | ||
// styles.css | ||
.card { | ||
background-color: var(--cnvs-sys-color-bg-default); | ||
} | ||
``` | ||
|
||
## Tokens | ||
|
||
<BackgroundColors /> | ||
|
||
--- | ||
|
||
<BackgroundAlternateColors /> | ||
|
||
--- | ||
|
||
<BackgroundMutedColors /> | ||
|
||
--- | ||
|
||
<BackgroundContrastColors /> | ||
|
||
--- | ||
|
||
<BackgroundStatusColors /> | ||
|
||
</Unstyled> |
46 changes: 46 additions & 0 deletions
46
packages/canvas-tokens-docs/stories/system/ColorBorder.stories.mdx
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,46 @@ | ||
import {Meta, Unstyled} from '@storybook/blocks'; | ||
import {BorderColors, BorderContrastColors, BorderInputColors, BorderStatusColors } from './examples/Color/Border'; | ||
|
||
<Meta title="Docs/System Tokens/Color/Border" /> | ||
|
||
<Unstyled> | ||
|
||
# System Border Color Tokens | ||
|
||
System border color tokens provide values to create clear delineations between content. | ||
|
||
## Usage | ||
|
||
```ts | ||
// styles.ts | ||
import {system} from '@workday/canvas-tokens-web'; | ||
|
||
const styles = { | ||
borderColor: `var(${system.color.border.container})`, | ||
}; | ||
``` | ||
|
||
```css | ||
// styles.css | ||
.card { | ||
border-color: var(--cnvs-sys-color-border-container); | ||
} | ||
``` | ||
|
||
## Tokens | ||
|
||
<BorderColors /> | ||
|
||
--- | ||
|
||
<BorderContrastColors /> | ||
|
||
--- | ||
|
||
<BorderInputColors /> | ||
|
||
--- | ||
|
||
<BorderStatusColors /> | ||
|
||
</Unstyled> |
42 changes: 42 additions & 0 deletions
42
packages/canvas-tokens-docs/stories/system/ColorForeground.stories.mdx
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,42 @@ | ||
import {Meta, Unstyled} from '@storybook/blocks'; | ||
|
||
import { ForegroundColors, ForegroundStatusColors} from './examples/Color/Foreground'; | ||
|
||
<Meta title="Docs/System Tokens/Color/Foreground" /> | ||
|
||
<Unstyled> | ||
|
||
# System Foreground Color Tokens | ||
|
||
System foreground color tokens provide values for foreground elements. | ||
|
||
## Usage | ||
|
||
```ts | ||
// styles.ts | ||
import {system} from '@workday/canvas-tokens-web'; | ||
|
||
const styles = { | ||
color: `var(${system.color.fg.default})`, | ||
}; | ||
``` | ||
|
||
```css | ||
// styles.css | ||
.card { | ||
color: var(--cnvs-sys-color-fg-default); | ||
} | ||
``` | ||
|
||
## Tokens | ||
|
||
<ForegroundColors /> | ||
|
||
--- | ||
|
||
<ForegroundStatusColors /> | ||
|
||
--- | ||
|
||
</Unstyled> | ||
|
45 changes: 45 additions & 0 deletions
45
packages/canvas-tokens-docs/stories/system/ColorIcon.stories.mdx
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,45 @@ | ||
import {Meta, Unstyled} from '@storybook/blocks'; | ||
import {IconColors, IconPrimaryColors, IconStatusColors} from './examples/Color/Icon'; | ||
|
||
<Meta title="Docs/System Tokens/Color/Icon" /> | ||
|
||
<Unstyled> | ||
|
||
# System Icon Color Tokens | ||
|
||
System icon color tokens provide values for icons. | ||
|
||
## Usage | ||
|
||
```ts | ||
// styles.ts | ||
import {system} from '@workday/canvas-tokens-web'; | ||
|
||
const styles = { | ||
color: `var(${system.color.icon.default})`, | ||
}; | ||
``` | ||
|
||
```css | ||
// styles.css | ||
.icon { | ||
color: var(--cnvs-sys-color-icon-default); | ||
} | ||
``` | ||
|
||
## Tokens | ||
|
||
<IconColors /> | ||
|
||
--- | ||
|
||
<IconPrimaryColors /> | ||
|
||
--- | ||
|
||
<IconStatusColors /> | ||
|
||
--- | ||
|
||
</Unstyled> | ||
|
35 changes: 35 additions & 0 deletions
35
packages/canvas-tokens-docs/stories/system/ColorStatic.stories.mdx
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,35 @@ | ||
import {Meta, Unstyled} from '@storybook/blocks'; | ||
|
||
import { StaticColors } from "./examples/Color/Static" | ||
|
||
<Meta title="Docs/System Tokens/Color/Static" /> | ||
|
||
<Unstyled> | ||
|
||
# System Static Color Tokens | ||
|
||
System static color tokens provide consistent color values. | ||
|
||
## Usage | ||
|
||
```ts | ||
// styles.ts | ||
import {system} from '@workday/canvas-tokens-web'; | ||
|
||
const styles = { | ||
backgroundColor: `var(${system.color.static.blue.soft})`, | ||
}; | ||
``` | ||
|
||
```css | ||
// styles.css | ||
.info-card { | ||
background-color: var(--cnvs-sys-color-static-blue-soft); | ||
} | ||
``` | ||
|
||
## Tokens | ||
|
||
<StaticColors /> | ||
|
||
</Unstyled> |
43 changes: 43 additions & 0 deletions
43
packages/canvas-tokens-docs/stories/system/ColorText.stories.mdx
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,43 @@ | ||
import {Meta, Unstyled} from '@storybook/blocks'; | ||
|
||
import { TextColors, TextStatusColors } from "./examples/Color/Text" | ||
|
||
<Meta title="Docs/System Tokens/Color/Text" /> | ||
|
||
<Unstyled> | ||
|
||
# System Text Color Tokens | ||
|
||
System text color tokens provide values for typography. | ||
|
||
## Usage | ||
|
||
```ts | ||
// styles.ts | ||
import {system} from '@workday/canvas-tokens-web'; | ||
|
||
const styles = { | ||
color: `var(${system.color.text.default})`, | ||
}; | ||
``` | ||
|
||
```css | ||
// styles.css | ||
.card-text { | ||
color: var(--cnvs-sys-color-text-default); | ||
} | ||
``` | ||
|
||
--- | ||
|
||
## Tokens | ||
|
||
<TextColors /> | ||
|
||
--- | ||
|
||
<TextStatusColors /> | ||
|
||
--- | ||
|
||
</Unstyled> |
Oops, something went wrong.