♻️(react) migrate to Storybook 7
This new release comes with breaking changes for stories and mdx docs.
This commit is contained in:
@@ -24,15 +24,15 @@ Cunningham provides a versatile Input component that you can use in your forms.
|
||||
|
||||
You can use the following props to change the state of the Input component by using the `state` props.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--default"/>
|
||||
</Canvas>
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--success"/>
|
||||
</Canvas>
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--error"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -40,7 +40,7 @@ You can use the following props to change the state of the Input component by us
|
||||
|
||||
As a regular input, you can disable it by using the `disabled` props.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--disabled-empty"/>
|
||||
<Story id="components-forms-input--disabled-filled"/>
|
||||
</Canvas>
|
||||
@@ -49,13 +49,13 @@ As a regular input, you can disable it by using the `disabled` props.
|
||||
|
||||
You can define an icon that will appear on the left side of the input by using the `icon` props.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--icon"/>
|
||||
</Canvas>
|
||||
|
||||
You can also independently add an icon on the right side by using the `rightIcon` props.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--icon-right"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -63,13 +63,13 @@ You can also independently add an icon on the right side by using the `rightIcon
|
||||
|
||||
You can define a text that will appear below the input by using the `text` props.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--with-text"/>
|
||||
</Canvas>
|
||||
|
||||
You can also independently add a text on the right side by using the `rightText` props.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--with-both-texts"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -77,7 +77,7 @@ You can also independently add a text on the right side by using the `rightText`
|
||||
|
||||
By default, the input has a default width, like all inputs. But you can force it to take the full width of its container by using the `fullWidth` props.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--full-width"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -86,7 +86,7 @@ By default, the input has a default width, like all inputs. But you can force it
|
||||
You can display a counter of the number of characters entered in the input by using the `charsCounter` props. Please bare
|
||||
in mind to also define `charCounterMax`.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--char-counter"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -95,7 +95,7 @@ in mind to also define `charCounterMax`.
|
||||
Like a native input, you can use the Input component in a controlled or non controlled way. You can see the example below
|
||||
using the component in a controlled way.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--controlled"/>
|
||||
</Canvas>
|
||||
|
||||
@@ -103,7 +103,7 @@ using the component in a controlled way.
|
||||
|
||||
You can use the `ref` props to get a reference to the input element. The ref to the native input is nested inside the `input` attribute.
|
||||
|
||||
<Canvas withSource="open">
|
||||
<Canvas sourceState="shown">
|
||||
<Story id="components-forms-input--with-ref"/>
|
||||
</Canvas>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user