This commit is contained in:
Ubuntu
2026-07-03 16:58:28 +08:00
commit 32b43f85bd
6240 changed files with 1987678 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import React, { InputHTMLAttributes } from "react";
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
className?: string;
}
export const Input: React.FC<InputProps> = ({
type = "text",
placeholder = "Enter text",
className = "",
...props
}) => {
return (
<input
type={type}
placeholder={placeholder}
className={`px-4 py-2 w-full rounded border-2 shadow-md transition focus:outline-hidden focus:shadow-xs ${
props["aria-invalid"]
? "border-destructive text-destructive shadow-xs shadow-destructive"
: ""
} ${className}`}
{...props}
/>
);
};