-
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
c72340e
commit d53b2e7
Showing
3 changed files
with
89 additions
and
2 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 |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('react', 'react-dom'), 'version' => '3841f7c324ffa1d4415d'); | ||
<?php return array('dependencies' => array('react', 'react-dom'), 'version' => '2313942efbf357138322'); |
Large diffs are not rendered by default.
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,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', | ||
}, | ||
}; |