This commit is contained in:
2026-02-06 04:01:41 +08:00
parent 6c7095ffb3
commit 058ecf7e39
11 changed files with 127 additions and 112 deletions

View File

@@ -1,6 +1,7 @@
"use client";
import React, { useRef } from "react";
import { Button } from "@/components/ui/Button";
import { FileInputProps } from "../../types/controls";
interface FileInputComponentProps extends FileInputProps {
@@ -33,13 +34,15 @@ export function FileInput({ accept, onFileSelect, disabled, className, children
disabled={disabled}
className="hidden"
/>
<button
<Button
onClick={handleClick}
disabled={disabled}
className={`px-2 py-1 rounded shadow font-bold hover:cursor-pointer hover:bg-gray-200 text-gray-800 bg-white ${disabled ? 'opacity-50 cursor-not-allowed' : ''} ${className || ''}`}
variant="secondary"
size="sm"
className={className}
>
{children}
</button>
</Button>
</>
);
}