import { InboxOutlined } from "@ant-design/icons"; import { DraggingContext } from "../model/is_dragging"; import { useContext } from "react"; // This component is used to display a dropzone when a file is being dragged over the parent component export function Dropzone({ disabled = false }: { disabled?: boolean }) { const isDroppingFile = useContext(DraggingContext); const textStyle: { color?: string } = {}; let text = "Drop to upload"; if (disabled) { textStyle.color = "red"; text = "Target is offline"; } const borderColor = disabled ? "gray" : "rgb(22, 119, 255)"; return

{text}

; }