Initial commit
This commit is contained in:
20
src/components/UI/DropDown/DropDown.js
Normal file
20
src/components/UI/DropDown/DropDown.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import CSSModules from 'react-css-modules';
|
||||
import styles from './DropDown.css';
|
||||
|
||||
export default CSSModules((props) => {
|
||||
const options = props.items.map((s, i) => {
|
||||
return (
|
||||
<option styleName='Option' key={i} value={i}>{s}</option>
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<div styleName='DropDown'>
|
||||
<select styleName='Select' disabled={props.disabled} onChange={props.changed} value={props.selected}>
|
||||
{options}
|
||||
</select>
|
||||
</div>
|
||||
);
|
||||
|
||||
}, styles, {allowMultiple: true});
|
||||
Reference in New Issue
Block a user