You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
orario/src/components/ComboBox.jsx

19 lines
556 B
React

import { Icon } from './Icon.jsx'
2 years ago
export const ComboBox = ({ options, value, setValue }) => {
return (
2 years ago
<div class="input-combo">
<select onInput={e => setValue(e.target.value)}>
2 years ago
{options.map(option => (
<option value={option.value} selected={option.value === value}>
{option.label}
</option>
))}
</select>
<div class="icon">
2 years ago
<Icon name="expand_more" />
</div>
</div>
)
}