Skip to content

Commit

Permalink
docs(Dropdown): add DropdownSearchInput example
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Fedyashov committed Apr 25, 2017
1 parent 223e7c5 commit ea77d14
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react'
import { Dropdown } from 'semantic-ui-react'

const options = [
{ key: '100', text: '100', value: 100 },
{ key: '200', text: '200', value: 300 },
{ key: '300', text: '300', value: 300 },
{ key: '400', text: '400', value: 400 },
]

const DropdownExampleSearchInput = () => (
<Dropdown
search
searchInput={{ type: 'number' }}
selection
options={options}
placeholder='Select amount...'
/>
)

export default DropdownExampleSearchInput
5 changes: 5 additions & 0 deletions docs/app/Examples/modules/Dropdown/Usage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ const DropdownUsageExamples = () => (
description='A dropdown item can be rendered differently inside the menu.'
examplePath='modules/Dropdown/Usage/DropdownExampleItemContent'
/>
<ComponentExample
title='Search Input'
description='A dropdown implements a search input shorthand.'
examplePath='modules/Dropdown/Usage/DropdownExampleSearchInput'
/>
<ComponentExample
title='Upward'
description='A dropdown can open its menu upward.'
Expand Down

0 comments on commit ea77d14

Please sign in to comment.