import { forwardRef } from 'react'; import type { ChangeEvent, FC, Ref } from 'react'; import { cn, defaultTextPropsLabel, removeFocusOutlines, defaultTextProps } from '~/utils/'; import { Input, Label } from '~/components/ui'; import { useLocalize } from '~/hooks'; interface InputWithLabelProps { id: string; value: string; label: string; subLabel?: string; onChange: (event: ChangeEvent) => void; labelClassName?: string; inputClassName?: string; ref?: Ref; } const InputWithLabel: FC = forwardRef((props, ref) => { const { id, value, label, subLabel, onChange, labelClassName = '', inputClassName = '' } = props; const localize = useLocalize(); return ( <>
{subLabel && (
{subLabel}
)}
); }); export default InputWithLabel;