import { FC, ReactNode } from "react"; import { useInputWrapperStyles } from "./styles"; export interface Props { label: string; labelSize?: 'normal' | 'small'; noMargin?: boolean; className?: string; error?: JSX.Element | string; children: ReactNode; } const InputWrapper: FC = ({ error, label, children, labelSize = 'normal', noMargin = false, className = "" }) => { const { classes } = useInputWrapperStyles({ labelSize, noMargin, hasError: !!error }) return
{children} {error}
} export default InputWrapper;