Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
34 lines
1000 B
TypeScript
34 lines
1000 B
TypeScript
import * as React from 'react';
|
|
import Box from '@mui/material/Box';
|
|
import InputLabel from '@mui/material/InputLabel';
|
|
import MenuItem from '@mui/material/MenuItem';
|
|
import FormControl from '@mui/material/FormControl';
|
|
import Select, { SelectChangeEvent } from '@mui/material/Select';
|
|
|
|
export default function BasicSelect() {
|
|
const [age, setAge] = React.useState('');
|
|
|
|
const handleChange = (event: SelectChangeEvent) => {
|
|
setAge(event.target.value as string);
|
|
};
|
|
|
|
return (
|
|
<Box sx={{ minWidth: 120 }}>
|
|
<FormControl fullWidth>
|
|
<InputLabel id="demo-simple-select-label">Age</InputLabel>
|
|
<Select
|
|
labelId="demo-simple-select-label"
|
|
id="demo-simple-select"
|
|
value={age}
|
|
label="Age"
|
|
onChange={handleChange}
|
|
>
|
|
<MenuItem value={10}>Ten</MenuItem>
|
|
<MenuItem value={20}>Twenty</MenuItem>
|
|
<MenuItem value={30}>Thirty</MenuItem>
|
|
</Select>
|
|
</FormControl>
|
|
</Box>
|
|
);
|
|
}
|