-
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.
Merge pull request #75 from brainstormforce/SUR-289
SUR-289 - Added label story
- Loading branch information
Showing
1 changed file
with
87 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,87 @@ | ||
import Label from './label.jsx'; | ||
|
||
export default { | ||
title: 'Atoms/Label', | ||
component: Label, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: [ 'autodocs' ], | ||
argTypes: { | ||
size: { | ||
name: 'Size', | ||
description: 'Defines the size of the label.', | ||
control: 'select', | ||
options: [ 'xs', 'sm', 'md' ], | ||
table: { | ||
type: { summary: 'string' }, | ||
defaultValue: { summary: 'sm' }, | ||
}, | ||
}, | ||
variant: { | ||
name: 'Variant', | ||
description: 'Defines the style variant of the label.', | ||
control: 'select', | ||
options: [ 'neutral', 'help', 'error', 'disabled' ], | ||
table: { | ||
type: { summary: 'string' }, | ||
defaultValue: { summary: 'neutral' }, | ||
}, | ||
}, | ||
required: { | ||
name: 'Required', | ||
description: 'Defines if the label is required.', | ||
control: 'boolean', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
defaultValue: { summary: 'false' }, | ||
}, | ||
}, | ||
children: { | ||
name: 'Text', | ||
description: 'The label text or content.', | ||
control: 'text', | ||
defaultValue: 'Label Text', | ||
}, | ||
}, | ||
}; | ||
|
||
// Basic Label | ||
export const Basic = { | ||
args: { | ||
size: 'sm', | ||
variant: 'neutral', | ||
required: false, | ||
children: 'Basic Label', | ||
}, | ||
}; | ||
|
||
// Required Label | ||
export const Required = { | ||
args: { | ||
size: 'sm', | ||
variant: 'neutral', | ||
required: true, | ||
children: 'Required Label', | ||
}, | ||
}; | ||
|
||
// Error Variant | ||
export const Error = { | ||
args: { | ||
size: 'sm', | ||
variant: 'error', | ||
required: false, | ||
children: 'Error Label', | ||
}, | ||
}; | ||
|
||
// Disabled Variant | ||
export const Disabled = { | ||
args: { | ||
size: 'sm', | ||
variant: 'disabled', | ||
required: false, | ||
children: 'Disabled Label', | ||
}, | ||
}; |