import React from 'react'; import { Box, MenuItem, Select, SelectChangeEvent, Typography } from '@mui/material'; interface Option { label: string; value: T; } const SelectWithDesc = ({ selected, options, onChange, description }: { selected: T; options: Option[]; onChange: (value: T) => void; description: string; }) => { const handleChange = (event: SelectChangeEvent) => { const newValue = typeof selected === 'boolean' ? event.target.value === 'true' : event.target.value; onChange(newValue as T); }; return ( {description} ); }; export default SelectWithDesc;