import classNames from 'classnames' import { useEffect, useState } from 'react' import Select from '~components/Select' import './index.scss' interface Props { name: string label: string description?: string open: boolean value?: string className?: string imageAlt?: string imageClass?: string imageSrc?: string[] children: React.ReactNode onOpenChange: () => void onChange: (value: string) => void onClose: () => void } const SelectTableField = (props: Props) => { const [value, setValue] = useState('') useEffect(() => { if (props.value) setValue(props.value) }, [props.value]) const image = () => { return props.imageSrc && props.imageSrc.length > 0 ? (
{props.description}