Rev 1781 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'import { InputLabel, MenuItem, Select } from '@mui/material'import InputBase from './InputBase'const SelectInput = ({label = '',options = [],inputRef = null,id = '',...rest}) => {return (<>{label ? (<InputLabel shrink htmlFor={id}>{label}</InputLabel>) : null}<Select ref={inputRef} input={<InputBase />} id={id} fullWidth {...rest}>{options.map(({ name, value }) => (<MenuItem key={value} value={value}>{name}</MenuItem>))}</Select></>)}export default SelectInput