import { forwardRef, InputHTMLAttributes } from "react";
import { InfoWrapper, InfoWrapperProps } from "@components/form/InfoWrapper.js";
import { AlertCircleIcon } from "lucide-react";
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 && (
)}
);
});