// @flow import React from 'react'; export default class UnitDropdown extends React.Component { props: { value: string, options: string[], onChange?: (value: string) => void }; state: { expanded: boolean } = { expanded: false }; render() { const { value, options, onChange } = this.props; const isReadonly = !onChange; return (
); } onToggleExpand = () => { this.setState(state => { return { expanded: !state.expanded }; }); }; }