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
JavaScript

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