-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Make Text Input and Text Area uncontrolled in stories (#1533)
Co-authored-by: Vincent Smedinga <[email protected]>
- Loading branch information
1 parent
2ccc1bc
commit d4da3f7
Showing
3 changed files
with
12 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,15 @@ const meta = { | |
invalid: false, | ||
}, | ||
argTypes: { | ||
defaultValue: { | ||
table: { disable: true }, | ||
}, | ||
disabled: { | ||
description: 'Prevents interaction. Avoid if possible.', | ||
}, | ||
invalid: { | ||
description: 'Whether the value fails a validation rule.', | ||
}, | ||
value: { | ||
description: 'The value of the field.', | ||
}, | ||
}, | ||
} satisfies Meta<typeof TextInput> | ||
|
||
|
@@ -34,22 +34,22 @@ export const Default: Story = {} | |
|
||
export const EmailAddress: Story = { | ||
args: { | ||
defaultValue: '[email protected]', | ||
type: 'email', | ||
value: '[email protected]', | ||
}, | ||
} | ||
|
||
export const WebAddress: Story = { | ||
args: { | ||
defaultValue: 'https://designsystem.amsterdam/', | ||
type: 'url', | ||
value: 'https://designsystem.amsterdam/', | ||
}, | ||
} | ||
|
||
export const PhoneNumber: Story = { | ||
args: { | ||
defaultValue: '14020', | ||
type: 'tel', | ||
value: '14020', | ||
}, | ||
} | ||
|
||
|
@@ -61,14 +61,14 @@ export const Placeholder: Story = { | |
|
||
export const Invalid: Story = { | ||
args: { | ||
defaultValue: 'Invalid value', | ||
invalid: true, | ||
value: 'Invalid value', | ||
}, | ||
} | ||
|
||
export const Disabled: Story = { | ||
args: { | ||
defaultValue: 'Disabled input', | ||
disabled: true, | ||
value: 'Disabled input', | ||
}, | ||
} |