Skip to content

Commit

Permalink
docs(Form): add an example of accessible Form.Select (#3157)
Browse files Browse the repository at this point in the history
docs(Form): add an example of accessible Form.Select
  • Loading branch information
arthurdenner authored and layershifter committed Sep 17, 2018
1 parent c1e130f commit 6d818b5
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import React from 'react'
import { Form, Input, TextArea, Button } from 'semantic-ui-react'
import { Form, Input, TextArea, Button, Select } from 'semantic-ui-react'

const genderOptions = [
{ key: 'm', text: 'Male', value: 'male' },
{ key: 'f', text: 'Female', value: 'female' },
]

const FormExampleFieldControlId = () => (
<Form>
Expand All @@ -16,6 +21,14 @@ const FormExampleFieldControlId = () => (
label='Last name'
placeholder='Last name'
/>
<Form.Field
control={Select}
options={genderOptions}
label={{ children: 'Gender', htmlFor: 'form-select-control-gender' }}
placeholder='Gender'
search
searchInput={{ id: 'form-select-control-gender' }}
/>
</Form.Group>
<Form.Field
id='form-textarea-control-opinion'
Expand Down

0 comments on commit 6d818b5

Please sign in to comment.