-
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
1088575
commit 5167158
Showing
3 changed files
with
49 additions
and
15 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,42 @@ | ||
import React from 'react' | ||
import { HelperText } from '@squaress/ui/helper-text' | ||
import type { Meta, StoryFn } from '@storybook/react' | ||
|
||
export default { | ||
title: 'Components/HelperText', | ||
component: HelperText, | ||
argTypes: { | ||
variant: { | ||
control: { type: 'select', options: ['default', 'success', 'error'] }, | ||
}, | ||
show: { | ||
control: { type: 'boolean' }, | ||
}, | ||
children: { | ||
control: { type: 'text' }, | ||
}, | ||
}, | ||
} as Meta<typeof HelperText> | ||
|
||
const Template: StoryFn = (args) => <HelperText {...args} /> | ||
|
||
export const Default = Template.bind({}) | ||
Default.args = { | ||
variant: 'default', | ||
show: true, | ||
children: 'This is a default helper text.', | ||
} | ||
|
||
export const Success = Template.bind({}) | ||
Success.args = { | ||
variant: 'success', | ||
show: true, | ||
children: 'This is a success helper text.', | ||
} | ||
|
||
export const Error = Template.bind({}) | ||
Error.args = { | ||
variant: 'error', | ||
show: true, | ||
children: 'This is an error helper text.', | ||
} |
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