UNPKG

595 BJavaScriptView Raw
1import { WHITE, GRAY_950 } from '../../dist/tokens/js/tokens';
2import TokensStory from './tokens_story.vue';
3
4export const createDesignTokenStory = ({
5 tokens = {},
6 isBackgroundColorStory = true,
7 containerClass = '',
8} = {}) => {
9 const Story = (args, { argTypes }) => ({
10 props: Object.keys(argTypes),
11 components: {
12 TokensStory,
13 },
14 provide: {
15 containerClass,
16 isBackgroundColorStory,
17 lightBackground: WHITE,
18 darkBackground: GRAY_950,
19 },
20 template: `<tokens-story v-bind="$props" />`,
21 });
22 Story.args = { tokens };
23
24 return Story;
25};