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