Skip to content

Commit

Permalink
creating button component
Browse files Browse the repository at this point in the history
  • Loading branch information
brenocastelo committed Dec 13, 2022
1 parent b80b629 commit 70d5e2a
Show file tree
Hide file tree
Showing 9 changed files with 6,968 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
},
"dependencies": {
"@ignite-ui/eslint-config": "*",
"@ignite-ui/ts-config": "*",
"@ignite-ui/react": "*",
"@ignite-ui/tokens": "*",
"@ignite-ui/ts-config": "*",
"phosphor-react": "^1.4.1",
"polished": "^4.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
48 changes: 48 additions & 0 deletions packages/docs/src/stories/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { Button, ButtonProps } from '@ignite-ui/react';
import { Meta, StoryObj } from '@storybook/react';
import { ArrowRight } from 'phosphor-react';

export default {
title: 'Form/Button',
component: Button,
args: {
children: 'Send',
},
} as Meta<ButtonProps>;

export const Primary: StoryObj<ButtonProps> = {};
export const Secondary: StoryObj<ButtonProps> = {
args: {
variant: 'secondary',
children: 'Create new',
},
};

export const Tertiary: StoryObj<ButtonProps> = {
args: {
variant: 'tertiary',
children: 'Cancel',
},
};

export const Small: StoryObj<ButtonProps> = {
args: {
size: 'sm',
},
};
export const WithIcon: StoryObj<ButtonProps> = {
args: {
children: (
<>
Next step
<ArrowRight weight="bold" />
</>
),
},
};

export const Disabled: StoryObj<ButtonProps> = {
args: {
disabled: true,
},
};
Loading

0 comments on commit 70d5e2a

Please sign in to comment.