-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
30 changed files
with
243 additions
and
204 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 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
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
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 |
---|---|---|
@@ -1,130 +1,150 @@ | ||
import { StoryObj, Meta } from "@storybook/react"; | ||
import Box from "."; | ||
import { StoryObj, Meta } from '@storybook/react'; | ||
import Box from '.'; | ||
|
||
const meta = { | ||
title: "Components/common/Box", | ||
title: 'Components/common/Box', | ||
component: Box, | ||
tags: ["autodocs"], | ||
tags: ['autodocs'], | ||
argTypes: { | ||
display: { | ||
control: { | ||
type: "select", | ||
type: 'select', | ||
}, | ||
options: ["flex", "block", "inline-block"], | ||
defaultValue: "flex", | ||
options: ['flex', 'block', 'inline-block'], | ||
defaultValue: 'flex', | ||
table: { | ||
defaultValue: { summary: "flex" }, | ||
type: { summary: "flex | block | inline-block" }, | ||
defaultValue: { summary: 'flex' }, | ||
type: { summary: 'flex | block | inline-block' }, | ||
}, | ||
}, | ||
width: { | ||
control: { | ||
type: "text", | ||
type: 'text', | ||
}, | ||
defaultValue: "100%", | ||
defaultValue: '100%', | ||
table: { | ||
defaultValue: { summary: "100%" }, | ||
type: { summary: "string" }, | ||
defaultValue: { summary: '100%' }, | ||
type: { summary: 'string' }, | ||
}, | ||
}, | ||
height: { | ||
control: { | ||
type: "text", | ||
type: 'text', | ||
}, | ||
defaultValue: "100%", | ||
defaultValue: '100%', | ||
table: { | ||
defaultValue: { summary: "100%" }, | ||
type: { summary: "string" }, | ||
defaultValue: { summary: '100%' }, | ||
type: { summary: 'string' }, | ||
}, | ||
}, | ||
padding: { | ||
control: { | ||
type: "select", | ||
type: 'select', | ||
options: [0, 1, 2, 3, 4, 5, 6], | ||
}, | ||
defaultValue: 0, | ||
table: { | ||
defaultValue: { summary: 0 }, | ||
type: { summary: "number" }, | ||
type: { summary: 'number' }, | ||
}, | ||
}, | ||
$backgroundColor: { | ||
control: { | ||
type: "radio", | ||
}, | ||
options: ["primary", "black", "white", "darkGray", "gray", "lightGray", "whiteGray"], | ||
defaultValue: "primary", | ||
type: 'radio', | ||
}, | ||
options: [ | ||
'primary', | ||
'black', | ||
'white', | ||
'darkGray', | ||
'gray', | ||
'lightGray', | ||
'whiteGray', | ||
], | ||
defaultValue: 'primary', | ||
table: { | ||
defaultValue: { summary: "primary" }, | ||
type: { summary: "primary | black | white | darkGray |gray | lightGray | whiteGray" }, | ||
defaultValue: { summary: 'primary' }, | ||
type: { | ||
summary: | ||
'primary | black | white | darkGray |gray | lightGray | whiteGray', | ||
}, | ||
}, | ||
}, | ||
border: { | ||
control: { | ||
type: "select", | ||
type: 'select', | ||
}, | ||
options: ["none", "1px solid black"], | ||
defaultValue: "none", | ||
options: ['none', '1px solid black'], | ||
defaultValue: 'none', | ||
table: { | ||
defaultValue: { summary: "none" }, | ||
type: { summary: "none | 1px solid black" }, | ||
defaultValue: { summary: 'none' }, | ||
type: { summary: 'none | 1px solid black' }, | ||
}, | ||
}, | ||
overflow: { | ||
control: { | ||
type: "select", | ||
type: 'select', | ||
}, | ||
options: ["visible", "hidden", "scroll", "auto"], | ||
defaultValue: "visible", | ||
options: ['visible', 'hidden', 'scroll', 'auto'], | ||
defaultValue: 'visible', | ||
table: { | ||
defaultValue: { summary: "visible" }, | ||
type: { summary: "visible | hidden | scroll | auto" }, | ||
defaultValue: { summary: 'visible' }, | ||
type: { summary: 'visible | hidden | scroll | auto' }, | ||
}, | ||
}, | ||
color: { | ||
control: { | ||
type: "radio", | ||
}, | ||
options: ["primary", "black", "white", "darkGray", "gray", "lightGray", "whiteGray"], | ||
defaultValue: "primary", | ||
type: 'radio', | ||
}, | ||
options: [ | ||
'primary', | ||
'black', | ||
'white', | ||
'darkGray', | ||
'gray', | ||
'lightGray', | ||
'whiteGray', | ||
], | ||
defaultValue: 'primary', | ||
table: { | ||
defaultValue: { summary: "primary" }, | ||
type: { summary: "primary | black | white | darkGray |gray | lightGray | whiteGray" }, | ||
defaultValue: { summary: 'primary' }, | ||
type: { | ||
summary: | ||
'primary | black | white | darkGray |gray | lightGray | whiteGray', | ||
}, | ||
}, | ||
}, | ||
$borderRadius: { | ||
control: { | ||
type: "radio", | ||
type: 'radio', | ||
}, | ||
options: ["small", "medium"], | ||
defaultValue: "small", | ||
options: ['small', 'medium'], | ||
defaultValue: 'small', | ||
table: { | ||
defaultValue: { summary: "small" }, | ||
type: { summary: "small | medium" }, | ||
defaultValue: { summary: 'small' }, | ||
type: { summary: 'small | medium' }, | ||
}, | ||
}, | ||
children: { | ||
control: { | ||
type: "text", | ||
type: 'text', | ||
}, | ||
defaultValue: "Button", | ||
defaultValue: 'Button', | ||
table: { | ||
defaultValue: { summary: "Button" }, | ||
type: { summary: "string" }, | ||
defaultValue: { summary: 'Button' }, | ||
type: { summary: 'string' }, | ||
}, | ||
}, | ||
}, | ||
|
||
} as Meta<typeof Box>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
//make a Default has background Color | ||
|
||
|
||
export const Default: Story = { | ||
args: { | ||
children: "Box", | ||
children: 'Box', | ||
}, | ||
}; |
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
Oops, something went wrong.