import * as React from 'react'; import Dropdown from '../../components/dropdown'; const style = require('../style.css'); const countries = [ { value: 'EN-gb', label: 'England', img: 'http://' }, { value: 'ES-es', label: 'Spain', img: 'http://' }, { value: 'TH-th', label: 'Thailand', img: 'http://' }, { value: 'EN-en', label: 'USA', img: 'http://' }, { value: 'FR-fr', label: 'France', img: 'http://' }, ]; class DropdownTest extends React.Component { state: any = { dropdown4: 'TH-th', }; handleChange = (dropdown: any, value: any) => { console.log('selected', value); const newState: any = {}; newState[dropdown] = value; this.setState(newState); }; customDropdownItem(data: any) { return (
{data.label} {data.value}
); } render() { return (
Dropdown

lorem ipsum...

); } } export default DropdownTest;