import type React from "react"; import { forwardRef, InputHTMLAttributes } from "react"; import { ExclamationCircleIcon } from "@heroicons/react/24/outline"; export interface InputProps extends InputHTMLAttributes { label: string; description?: string; prefix?: string; suffix?: string; action?: { icon: JSX.Element; action: () => void; }; error?: string; } export const Input = forwardRef(function Input( { label, description, prefix, suffix, action, error, ...rest }: InputProps, ref ) { return (
{/* Label */} {/* */}
{prefix && ( {prefix} )} {suffix && (
{suffix}
)} {action && ( )} {error && (
)}
{description && (

{description}

)} {error &&

{error}

}
); });