Skip to content

Commit

Permalink
chore: renamed story titles
Browse files Browse the repository at this point in the history
  • Loading branch information
shindigira committed Jan 25, 2024
1 parent b251154 commit 4ce8379
Showing 1 changed file with 40 additions and 20 deletions.
60 changes: 40 additions & 20 deletions src/components/TextInput/TextInput.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,76 +14,92 @@ export default meta;

type Story = StoryObj<typeof meta>;

export const Default: Story = {
export const Enabled: Story = {
args: {
name: 'Default',
id: 'Default',
value: 'Default',
name: 'Enabled',
id: 'Enabled',
value: 'Enabled',
type: 'text'
}
};

export const Hover: Story = {
args: {
...Default.args,
...Enabled.args,
name: 'Hover',
id: 'Hover',
value: 'Hover'
},
render: _arguments => <TextInput {..._arguments} className='hover' />
};

export const Focus: Story = {
args: {
...Default.args,
...Enabled.args,
name: 'Focus',
id: 'Focus',
value: 'Focus'
},
render: _arguments => <TextInput {..._arguments} className='focus' />
};

export const Disabled: Story = {
args: {
...Default.args,
...Enabled.args,
value: 'Disabled',
name: 'Disabled',
id: 'Disabled',
disabled: true
}
};

export const Success: Story = {
args: {
...Default.args,
...Enabled.args,
value: 'Success',
name: 'Success',
id: 'Success',
status: 'success'
}
};

export const Warning: Story = {
args: {
...Default.args,
...Enabled.args,
value: 'Warning',
name: 'Warning',
id: 'Warning',
status: 'warning'
}
};

export const Error: Story = {
args: {
...Default.args,
...Enabled.args,
value: 'Error',
name: 'Error',
id: 'Error',
status: 'error'
}
};

export const FullWidth: Story = {
name: 'Text input (full width)',
name: 'Full Width',
args: {
...Default.args,
...Enabled.args,
value: 'Input text',
name: 'fullWidth',
id: 'fullWidth',
isFullWidth: true
}
};

export const WithButton: Story = {
name: 'Text input (with button)',
name: 'With button',
args: {
...Default.args,
...Enabled.args,
name: 'withButton',
id: 'withButton',
value: ''
},
render: _arguments => (
Expand All @@ -99,11 +115,13 @@ export const WithButton: Story = {
};

export const WithButtonInsideText: Story = {
name: 'Button inside text input',
name: 'Button inside',
args: {
...Default.args,
...Enabled.args,
value:
"This is some really long text to make sure that the button doesn't overlap the content in such a way that this input becomes unusable."
"This is some really long text to make sure that the button doesn't overlap the content in such a way that this input becomes unusable.",
name: 'ButtonInside',
id: 'ButtonInside'
},
render: _arguments => (
<div className='m-btn-inside-input'>
Expand All @@ -116,11 +134,13 @@ export const WithButtonInsideText: Story = {
};

export const WithButtonInsideButton: Story = {
name: 'Button inside text input with another button',
name: 'Button inside (with button)',
args: {
...Default.args,
...Enabled.args,
value:
"This is some really long text to make sure that the button doesn't overlap the content in such a way that this input becomes unusable."
"This is some really long text to make sure that the button doesn't overlap the content in such a way that this input becomes unusable.",
name: 'ButtonInsideButton',
id: 'ButtonInsideButton'
},
render: _arguments => (
<div className='o-form__input-w-btn'>
Expand Down

0 comments on commit 4ce8379

Please sign in to comment.