import React from 'react'; import { Row, Col, MenuItem, Button } from 'react-bootstrap'; import { Card, Popup, SelectionBox, ListBox, MaskedInput, Fa } from '../../components/index'; import FormModalExample from './form-modal-example'; const options = [ { value: 1, label: 'banana', color: '#395BFF' }, { value: 2, label: 'apple', color: '#FF3A54' }, { value: 3, label: 'strawberry', color: '#3B873B' }, { value: 4, label: 'orange', color: '#348787' }, { value: 5, label: 'Rio de Janeiro', color: '#EB0030' }, { value: 6, label: 'São Paulo', color: '#ABCCA4' }, { value: 7, label: 'Arlington', color: '#06987B' } ]; const options2 = [ 'Rio de Janeiro', 'Arlington', 'São Paulo', 'Boa Vista', 'Caxambu', 'Búzios', 'New Orleans', 'Finlandia', 'Duque de Caxias', 'Blumenau', 'Dhaka', 'Namibia', 'Nigeria', 'Russia', 'Caxias', 'Jd. 25 de Agosto', 'Santa Cruz da Serra' ]; const options3 = [ 'Yes', 'No' ]; /** * Initial page that declare all routes of the module */ export default class StuffExamples extends React.Component { constructor(props) { super(props); this.popupClick = this.popupClick.bind(this); this.onChange = this.onChange.bind(this); this.state = { selBox1: [options[1], options[2], options[5]] }; } popupClick() { this.refs.pop1.show(); } itemDisplay(item) { return ( {item.label} ); } onChange(ref) { const self = this; return (val) => { const obj = {}; obj[ref] = val; self.setState(obj); }; } onChange2(ref) { const self = this; return (evt, val) => { const obj = {}; obj[ref] = val; self.setState(obj); }; } show(cpt, show) { const self = this; return () => { const obj = {}; obj[cpt] = show; self.setState(obj); }; } render() { const listBoxOptions = []; options2.map(a => { listBoxOptions.push({a}); }); return (
{'Test 1'} {'Test 2'}
    {this.state.selBox1 && this.state.selBox1.map(item =>
  • {item.label}
  • ) }
{this.state.selBox1 && this.state.selBox2}
{this.state.selBox3} {this.state.selBox4} {this.state.selBox5 && this.state.selBox5.map(item =>
  • {item}
  • ) }
    {this.state.selBox3}
    ); } }