refactor: add File in FormElements
This commit is contained in:
1 parent
a3cb0616c1
commit
41bea34b2f
2 files changed
+11
-3
No files matched your search
@@ -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,
|
||||
};
|
||||
Reference in new issue
Block a user