Files
kevisual-center-v1/packages/components/src/select/index.tsx
2025-03-20 21:47:50 +08:00

19 lines
481 B
TypeScript

import { MenuItem, Select as MuiSelect, SelectProps as MuiSelectProps } from '@mui/material';
type SelectProps = {
options?: { label: string; value: string }[];
} & MuiSelectProps;
export const Select = (props: SelectProps) => {
const { options, ...rest } = props;
return (
<MuiSelect {...rest}>
{options?.map((option) => (
<MenuItem key={option.value} value={option.value}>
{option.label}
</MenuItem>
))}
</MuiSelect>
);
};