Update the examples

This commit is contained in:
Kelly Dwan 2018-12-13 12:04:16 -05:00
parent b8ba4ed16d
commit 8f5861f8b5
1 changed files with 23 additions and 8 deletions

View File

@ -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>
) );
```
```