import React from 'react';
import PropTypes from 'prop-types';
import { DropdownItem, DropdownDivider } from './Base';
class InnerLabelDropdown extends React.Component {
constructor(props) {
super(props);
this.state = {
isOpen: false,
};
this.toggle = this.toggle.bind(this);
this.close = this.close.bind(this);
}
toggle() {
this.setState({
isOpen: !this.state.isOpen,
});
}
close() {
this.setState({
isOpen: false,
});
}
selectOption(opt) {
this.close();
this.props.handleUpdate(opt);
}
getOptionElems() {
return this.props.options.map((opt, i) => {
if (opt.type === 'divider') {
return