refactor: add File in FormElements

This commit is contained in:
robin committed 2026-07-25 19:21:19 +02:00
1 parent a3cb0616c1
commit 41bea34b2f
2 files changed
+11 -3

No files matched your search

+10
View File
@@ -25,7 +25,17 @@ function Dropdown({ children, ...props }: ComponentPropsWithoutRef<"select">) {
);
}
export function File({ ...props }: ComponentPropsWithoutRef<"input">) {
return (
<input
type="file"
className="p-1 text-sm w-full rounded-lg border border-neutral-300 dark:border-neutral-700 bg-white dark:bg-black text-black dark:text-white cursor-pointer file:mr-4 file:py-2 file:px-4 file:rounded-sm file:border-0 file:font-semibold file:transition file:bg-neutral-100 file:text-neutral-900 dark:file:bg-neutral-800 dark:file:text-white hover:file:bg-neutral-900 hover:file:text-white dark:hover:file:bg-white dark:hover:file:text-black"
{...props}
/>
);
}
export const Input = {
Text: Textfield,
Select: Dropdown,
File: File,
};