-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from 0ne6yte/feature/button-renewal
feat: Button style variant, color로 분기
- Loading branch information
Showing
4 changed files
with
100 additions
and
43 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
This file was deleted.
Oops, something went wrong.
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,81 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { Button } from '@/domain/_common/components'; | ||
|
||
const meta = { | ||
title: 'Components/Button', | ||
component: Button, | ||
parameters: { | ||
layout: 'centered', | ||
design: { | ||
type: 'figma', | ||
url: 'https://www.figma.com/file/KHvd0JBcID35sOdr61Iief/Main?type=design&node-id=558-293&mode=design&t=lrfbeqjL6cPdTJqE-4', | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof Button>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Button>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
children: 'default', | ||
}, | ||
}; | ||
export const Grey: Story = { | ||
render: () => ( | ||
<div className="flex gap-2 w-[800px] flex-wrap"> | ||
<Button variant="text" color="grey"> | ||
text | ||
</Button> | ||
<Button variant="text" color="grey" disabled> | ||
text | ||
</Button> | ||
<Button variant="contained" color="grey"> | ||
contained | ||
</Button> | ||
<Button variant="contained" color="grey" disabled> | ||
contained | ||
</Button> | ||
</div> | ||
), | ||
}; | ||
|
||
export const Primary: Story = { | ||
render: () => ( | ||
<div className="flex gap-2 w-[800px] flex-wrap"> | ||
<Button variant="text" color="primary"> | ||
text | ||
</Button> | ||
<Button variant="text" color="primary" disabled> | ||
text | ||
</Button> | ||
<Button variant="contained" color="primary"> | ||
contained | ||
</Button> | ||
<Button variant="contained" color="primary" disabled> | ||
contained | ||
</Button> | ||
</div> | ||
), | ||
}; | ||
|
||
export const Red: Story = { | ||
render: () => ( | ||
<div className="flex gap-2 w-[800px] flex-wrap"> | ||
<Button variant="text" color="red"> | ||
text | ||
</Button> | ||
<Button variant="text" color="red" disabled> | ||
text | ||
</Button> | ||
<Button variant="contained" color="red"> | ||
contained | ||
</Button> | ||
<Button variant="contained" color="red" disabled> | ||
contained | ||
</Button> | ||
</div> | ||
), | ||
}; |
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