Skip to content

Commit

Permalink
added comments for shape of options for all Dropdown examples
Browse files Browse the repository at this point in the history
  • Loading branch information
fobbyal committed Dec 25, 2016
1 parent b82ddaa commit 0bc4019
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/app/Examples/modules/Dropdown/Types/DropdownExampleInline.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ import { Dropdown } from 'semantic-ui-react'

import { friendOptions } from '../common'

/** friendOptions shape **/
/**
[
{
text: 'Jenny Hess',
value: 'Jenny Hess',
image: { avatar: true, src: '/assets/images/avatar/small/jenny.jpg' },
},
{
text: 'Elliot Fu',
value: 'Elliot Fu',
image: { avatar: true, src: '/assets/images/avatar/small/elliot.jpg' },
},
...
]
**/
const DropdownExampleInline = () => (
<span>
Show me posts by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@ import React from 'react'
import { Dropdown, Input } from 'semantic-ui-react'

import { tagOptions } from '../common'
/** tagOptions shape **/
/**
[
{
text: 'Important',
value: 'Important',
label: { color: 'red', empty: true, circular: true },
},
{
text: 'Announcement',
value: 'Announcement',
label: { color: 'blue', empty: true, circular: true },
},
...
]
**/


const DropdownExampleMultipleSearchInMenu = () => (
<Dropdown text='Filter Posts' multiple>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { Dropdown } from 'semantic-ui-react'

import { stateOptions } from '../common'

/** stateOptions shape **/
/**
[
{ value: 'AL', text: 'Alabama' },
{ value: 'AK', text: 'Alaska' },
{ value: 'AZ', text: 'Arizona' },
...
]
**/

const DropdownExampleMultipleSearchSelection = () => (
<Dropdown placeholder='State' fluid multiple search selection options={stateOptions} />
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import React from 'react'
import { Dropdown } from 'semantic-ui-react'

import { countryOptions } from '../common'
/** countryOptions shape **/
/**
[
{ value: 'af', flag: 'af', text: 'Afghanistan' },
{ value: 'ax', flag: 'ax', text: 'Aland Islands' },
{ value: 'al', flag: 'al', text: 'Albania' },
...
]
**/

const DropdownExampleMultipleSearchSelectionTwo = () => (
<Dropdown placeholder='Select Country' fluid multiple search selection options={countryOptions} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import React from 'react'
import { Dropdown } from 'semantic-ui-react'

import { languageOptions } from '../common'
/** languageOptions shape **/
/**
[
{ text: 'Arabic', value: 'Arabic' },
{ text: 'Chinese', value: 'Chinese' },
...
]
**/

/**
* NOTE: In this example, the dropdown should contain a label on the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@ import React from 'react'
import { Dropdown, Input } from 'semantic-ui-react'

import { tagOptions } from '../common'
/** tagOptions shape **/
/**
[
{
text: 'Important',
value: 'Important',
label: { color: 'red', empty: true, circular: true },
},
{
text: 'Announcement',
value: 'Announcement',
label: { color: 'blue', empty: true, circular: true },
},
...
]
**/

const DropdownExampleSearchInMenu = () => (
<Dropdown text='Filter Posts' floating labeled button className='icon'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import React from 'react'
import { Dropdown } from 'semantic-ui-react'

import { countryOptions } from '../common'
/** countryOptions shape **/
/**
[
{ value: 'af', flag: 'af', text: 'Afghanistan' },
{ value: 'ax', flag: 'ax', text: 'Aland Islands' },
{ value: 'al', flag: 'al', text: 'Albania' },
...
]
**/

const DropdownExampleSearchSelection = () => (
<Dropdown placeholder='Select Country' fluid search selection options={countryOptions} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { Dropdown } from 'semantic-ui-react'

import { stateOptions } from '../common'

/** stateOptions shape **/
/**
[
{ value: 'AL', text: 'Alabama' },
{ value: 'AK', text: 'Alaska' },
{ value: 'AZ', text: 'Arizona' },
...
]
**/

const DropdownExampleSearchSelectionTwo = () => (
<Dropdown placeholder='State' search selection options={stateOptions} />
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@ import React from 'react'
import { Dropdown } from 'semantic-ui-react'

import { friendOptions } from '../common'
/** friendOptions shape **/
/**
[
{
text: 'Jenny Hess',
value: 'Jenny Hess',
image: { avatar: true, src: '/assets/images/avatar/small/jenny.jpg' },
},
{
text: 'Elliot Fu',
value: 'Elliot Fu',
image: { avatar: true, src: '/assets/images/avatar/small/elliot.jpg' },
},
...
]
**/


const DropdownExampleSelection = () => (
<Dropdown placeholder='Select Friend' fluid selection options={friendOptions} />
Expand Down

0 comments on commit 0bc4019

Please sign in to comment.