-
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.
- Loading branch information
1 parent
06af676
commit 620bf1b
Showing
5 changed files
with
168 additions
and
3 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
packages/canvas-tokens-docs/stories/system/ColorShadow.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,39 @@ | ||
import {Meta, Unstyled} from '@storybook/blocks'; | ||
|
||
import {ShadowColors} from './examples/Color/Shadow'; | ||
|
||
<Meta title="Docs/System Tokens/Color/Shadow" /> | ||
|
||
<Unstyled> | ||
|
||
# System Shadow Color Tokens | ||
|
||
System shadow color tokens provide values for box shadow. | ||
|
||
## Usage | ||
|
||
```ts | ||
// styles.ts | ||
import {system} from '@workday/canvas-tokens-web'; | ||
|
||
const styles = { | ||
boxShadow: `0 0 0 var(${system.color.shadow['1']})`, | ||
}; | ||
``` | ||
|
||
```css | ||
// styles.css | ||
.card-text { | ||
boxshadow: 0 0 0 var(--cnvs-sys-color-shadow-1); | ||
} | ||
``` | ||
|
||
--- | ||
|
||
## Tokens | ||
|
||
<ShadowColors /> | ||
|
||
--- | ||
|
||
</Unstyled> |
20 changes: 20 additions & 0 deletions
20
packages/canvas-tokens-docs/stories/system/examples/Color/Shadow.tsx
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,20 @@ | ||
import * as React from 'react'; | ||
import {system} from '@workday/canvas-tokens-web'; | ||
|
||
import { | ||
buildPaletteGroup, | ||
ColorGrid, | ||
sortSystemColorPalette, | ||
} from '../../../../components/ColorGrid'; | ||
|
||
const statusPalettes = buildPaletteGroup( | ||
'system.color.shadow', | ||
{ | ||
default: system.color.shadow.default, | ||
'1': system.color.shadow['1'], | ||
'2': system.color.shadow['2'], | ||
}, | ||
sortSystemColorPalette | ||
); | ||
|
||
export const ShadowColors = () => <ColorGrid name="Text Status Colors" palette={statusPalettes} />; |
100 changes: 100 additions & 0 deletions
100
packages/canvas-tokens-docs/stories/system/visual-testing/Color.stories.tsx
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,100 @@ | ||
import { | ||
BackgroundColors, | ||
BackgroundAlternateColors, | ||
BackgroundMutedColors, | ||
BackgroundContrastColors, | ||
BackgroundStatusColors, | ||
} from '../examples/Color/Background'; | ||
import { | ||
BorderColors, | ||
BorderContrastColors, | ||
BorderInputColors, | ||
BorderStatusColors, | ||
} from '../examples/Color/Border'; | ||
import {ForegroundColors, ForegroundStatusColors} from '../examples/Color/Foreground'; | ||
import {IconColors, IconPrimaryColors, IconStatusColors} from '../examples/Color/Icon'; | ||
import {ShadowColors} from '../examples/Color/Shadow'; | ||
import {StaticColors} from '../examples/Color/Static'; | ||
import {TextColors, TextStatusColors} from '../examples/Color/Text'; | ||
|
||
export default { | ||
title: 'Visual Tests/System Tokens/Colors', | ||
parameters: { | ||
chromatic: {disableSnapshot: false}, | ||
}, | ||
}; | ||
|
||
// BACKGROUND COLORS TESTS | ||
export const Background = { | ||
render: BackgroundColors, | ||
}; | ||
|
||
export const BackgroundAlternate = { | ||
render: BackgroundAlternateColors, | ||
}; | ||
|
||
export const BackgroundMuted = { | ||
render: BackgroundMutedColors, | ||
}; | ||
|
||
export const BackgroundContrast = { | ||
render: BackgroundContrastColors, | ||
}; | ||
|
||
export const BackgroundStatus = { | ||
render: BackgroundStatusColors, | ||
}; | ||
|
||
// BORDER COLORS TESTS | ||
export const Border = { | ||
render: BorderColors, | ||
}; | ||
export const BorderContrast = { | ||
render: BorderContrastColors, | ||
}; | ||
export const BorderInput = { | ||
render: BorderInputColors, | ||
}; | ||
export const BorderStatus = { | ||
render: BorderStatusColors, | ||
}; | ||
|
||
// FOREGROUND COLORS TESTS | ||
|
||
export const Foreground = { | ||
render: ForegroundColors, | ||
}; | ||
export const ForegroundStatus = { | ||
render: ForegroundStatusColors, | ||
}; | ||
|
||
// ICON COLORS TESTS | ||
|
||
export const Icon = { | ||
render: IconColors, | ||
}; | ||
export const IconPrimary = { | ||
render: IconPrimaryColors, | ||
}; | ||
export const IconStatus = { | ||
render: IconStatusColors, | ||
}; | ||
|
||
// SHADOW COLORS TESTS | ||
export const Shadow = { | ||
render: ShadowColors, | ||
}; | ||
|
||
// STATIC COLORS TESTS | ||
export const Static = { | ||
render: StaticColors, | ||
}; | ||
|
||
// TEXT COLORS TESTS | ||
export const Text = { | ||
render: TextColors, | ||
}; | ||
|
||
export const TextStatus = { | ||
render: TextStatusColors, | ||
}; |
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