import React from 'react'; import Dropdown from '../../components/dropdown'; export default React.createClass({ displayName: 'DropdownTest', getInitialState () { return { countries: [ { value: 'ES-es', label: 'Spain', img: 'http://' }, { value: 'TH-th', label: 'Thailand', img: 'http://' }, { value: 'EN-gb', label: 'England', img: 'http://' }, { value: 'EN-en', label: 'USA', img: 'http://' }, { value: 'FR-fr', label: 'France', img: 'http://' } ], selected: 'TH-th' }; }, onChange (dropdown) { console.log('[DROPDOWN]', dropdown.getValue()); }, customDropdownItem (data) { const style = { width: 32, height: 32, backgroundColor: '#ccc', marginRight: 8 }; return (
{data.label} {data.value}
); }, render () { return (
Dropdown

lorem ipsum...

); } });