Update the examples
This commit is contained in:
parent
b8ba4ed16d
commit
8f5861f8b5
|
@ -5,27 +5,42 @@ const MyTextControlWithAffixes = withState( {
|
|||
first: '',
|
||||
second: '',
|
||||
third: '',
|
||||
} )( ( { first, second, third, setState } ) => (
|
||||
fourth: '',
|
||||
fifth: '',
|
||||
} )( ( { first, second, third, fourth, fifth, setState } ) => (
|
||||
<div>
|
||||
<TextControlWithAffixes
|
||||
prefix="Prefix"
|
||||
placeholder="Placeholder text..."
|
||||
label="Text field without affixes"
|
||||
value={ first }
|
||||
placeholder="Placeholder"
|
||||
onChange={ value => setState( { first: value } ) }
|
||||
/>
|
||||
<TextControlWithAffixes
|
||||
prefix="Prefix"
|
||||
suffix="Suffix"
|
||||
placeholder="Placeholder text..."
|
||||
prefix="$"
|
||||
label="Text field with a prefix"
|
||||
value={ second }
|
||||
onChange={ value => setState( { second: value } ) }
|
||||
/>
|
||||
<TextControlWithAffixes
|
||||
prefix="Prefix"
|
||||
suffix="Suffix"
|
||||
placeholder="Placeholder text..."
|
||||
label="Text field with both affixes"
|
||||
value={ third }
|
||||
onChange={ value => setState( { third: value } ) }
|
||||
/>
|
||||
<TextControlWithAffixes
|
||||
suffix="%"
|
||||
label="Text field with a suffix"
|
||||
value={ fourth }
|
||||
onChange={ value => setState( { fourth: value } ) }
|
||||
/>
|
||||
<TextControlWithAffixes
|
||||
prefix="$"
|
||||
label="Text field with prefix and help text"
|
||||
value={ fifth }
|
||||
onChange={ value => setState( { fifth: value } ) }
|
||||
help="This is some help text."
|
||||
/>
|
||||
</div>
|
||||
) );
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue