import { forwardRef } from 'react'; import { Input } from '../ui/input'; import type { InputProps } from '../ui/input'; import { Label } from '../ui/label'; type InputWithLabelProps = InputProps & { label: string; error?: string | undefined; }; export const InputWithLabel = forwardRef( ({ label, className, ...props }, ref) => { return (
{props.error && ( {props.error} )}
); } ); InputWithLabel.displayName = 'InputWithLabel';