-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
c8b17f3
commit 8ddd04a
Showing
1 changed file
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import Badge from './button.jsx'; | ||
|
||
// Badge component story configuration | ||
export default { | ||
title: 'Components/Badge', | ||
component: Badge, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: [ 'autodocs' ], | ||
argTypes: { | ||
variant: { | ||
name: 'Variant', | ||
description: 'Defines the style variant of the badge.', | ||
control: 'select', | ||
options: [ "neutral", "red", "yellow", "green", "blue", "inverse" ], | ||
Check failure on line 16 in src/components/badge/badge.stories.js GitHub Actions / analysis (18.15)
Check failure on line 16 in src/components/badge/badge.stories.js GitHub Actions / analysis (18.15)
Check failure on line 16 in src/components/badge/badge.stories.js GitHub Actions / analysis (18.15)
Check failure on line 16 in src/components/badge/badge.stories.js GitHub Actions / analysis (18.15)
Check failure on line 16 in src/components/badge/badge.stories.js GitHub Actions / analysis (18.15)
|
||
table: { | ||
type: { summary: 'string' }, | ||
defaultValue: { summary: 'neutral' }, | ||
}, | ||
}, | ||
size: { | ||
name: 'Size', | ||
description: 'Defines the size of the badge.', | ||
control: 'select', | ||
options: [ 'xs', 'sm', 'md', 'lg' ], | ||
table: { | ||
type: { summary: 'string' }, | ||
defaultValue: { summary: 'md' }, | ||
}, | ||
}, | ||
type: { | ||
name: 'Type', | ||
description: 'Defines the type of the badge.', | ||
control: 'select', | ||
options: [ 'pill', 'rounded' ], | ||
table: { | ||
type: { summary: 'string' }, | ||
defaultValue: { summary: 'pill' }, | ||
}, | ||
}, | ||
disabled: { | ||
name: 'Disabled', | ||
description: 'Defines if the badge is disabled.', | ||
control: 'boolean', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
defaultValue: { summary: 'false' }, | ||
}, | ||
}, | ||
closable: { | ||
name: 'Clasable', | ||
description: 'Defines if the badge is closable.', | ||
control: 'boolean', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
defaultValue: { summary: 'true' }, | ||
}, | ||
}, | ||
label: { control: 'text', defaultValue: 'Badge' }, | ||
}, | ||
}; | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args | ||
export const Primary = { | ||
args: { | ||
variant: 'primary', | ||
children: 'Badge', | ||
}, | ||
}; | ||
|