ui: share tailwind config across packages

This commit is contained in:
Yangshun Tay
2022-10-03 20:33:35 +08:00
parent 5734758f96
commit de33d38e1b
23 changed files with 374 additions and 15 deletions

View File

@ -0,0 +1,33 @@
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { Button } from '@tih/ui';
import React from 'react';
//👇 This default export determines where your story goes in the story list
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
} as ComponentMeta<typeof Button>;
//👇 We create a “template” of how args map to rendering
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;
export const PrimaryButton = Template.bind({});
PrimaryButton.args = {
label: 'Button text',
size: 'md',
variant: 'primary',
};
export const SecondaryButton = Template.bind({});
SecondaryButton.args = {
label: 'Button text',
size: 'md',
variant: 'secondary',
};