import { FormControl, FormLabel, Select, SelectProps } from '@chakra-ui/react'; import { MouseEvent } from 'react'; type IAISelectProps = SelectProps & { label: string; styleClass?: string; validValues: | Array | Array<{ key: string; value: string | number }>; }; /** * Customized Chakra FormControl + Select multi-part component. */ const IAISelect = (props: IAISelectProps) => { const { label, isDisabled, validValues, size = 'sm', fontSize = 'md', styleClass, ...rest } = props; return ( ) => { e.stopPropagation(); e.nativeEvent.stopImmediatePropagation(); e.nativeEvent.stopPropagation(); e.nativeEvent.cancelBubble = true; }} > {label} ); }; export default IAISelect;