mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-06 13:43:59 -05:00
21 lines
346 B
TypeScript
21 lines
346 B
TypeScript
import { useRef } from "react";
|
|
|
|
|
|
export default function DragAndDropFileInput(){
|
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
|
|
|
|
return (
|
|
<div
|
|
className="relative border-2 rounded-lg w-full h-full cursor-pointer"
|
|
>
|
|
<input
|
|
ref={inputRef}
|
|
type="file"
|
|
className="sr-only"
|
|
/>
|
|
Drag And Drop File Input
|
|
</div>
|
|
);
|
|
}
|