FloorsDropDown
Usage
import FloorsDropDown from '../src/components/FloorsDropDown/'
class ExampleUsage extends Component {
state = {
currentFloor: {
uuid: 'uuid000',
name: '2rd floor',
},
floors: [
{
uuid: 'uuid000',
name: '2nd Floor',
},
{
uuid: 'uuid001',
name: '3rd Floor',
},
{
uuid: 'uuid002',
name: '4th Floor',
},
],
}
render() {
return (
<FloorsDropDown
currentFloor={this.state.currentFloor}
floors={this.state.floors}
onSelect={floor => {
this.setState({ currentFloor: floor })
}}
/>
)
}
}
Properties
currentFloor
- current floor objectfloors
- list of floor objectsonSelect
- floor selection callback
propName | propType | defaultValue | isRequired |
---|
currentFloor | object | { uuid: 'uuid000', name: 'name000' } | |
floors | array | [{ uuid: 'uuid000', name: 'name000' }] | + |
onSelect | func | () => {} | |