import { FC, useRef } from 'react'; import { v4 as uuid } from 'uuid'; import { InputType } from 'reactstrap/lib/Input'; import { FormGroup } from 'reactstrap'; export interface FormGroupContainerProps { value: string; onChange: (newValue: string) => void; id?: string; type?: InputType; required?: boolean; placeholder?: string; className?: string; labelClassName?: string; } export const FormGroupContainer: FC = ( { children, value, onChange, id, type, required, placeholder, className, labelClassName }, ) => { const forId = useRef(id ?? uuid()); return ( onChange(e.target.value)} /> ); };