summaryrefslogtreecommitdiffstats
path: root/stories/react/utils/components/DropdownMenu.js
blob: 4a694634955eb575169290cb383c368a656095fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import React from 'react';

const DropdownMenu = ({title, value, onChange, options}) => (
	<div className='option-container'>
		<label>{title}</label>
		<select value={value} onChange={onChange}>
			{options.map((option, i) =>
				<option key={i} value={option}>{option}</option>
			)}
		</select>
	</div>
);

export default DropdownMenu;