DocSpace-client/packages/shared/components/drag-and-drop
2024-07-16 10:30:28 +02:00
..
DragAndDrop.styled.ts Shared: refactor rtl 2024-07-16 10:30:28 +02:00
DragAndDrop.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
DragAndDrop.types.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
get-files-from-event.ts Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Client: fix after rewrite to typescript 2023-12-27 17:45:22 +03:00

DragAndDrop

Drag And Drop component can be used as Dropzone

See documentation: https://github.com/react-dropzone/react-dropzone

import { DragAndDrop } from "@docspace/shared/components";
<DragAndDrop onDrop={onDrop} style={width: 200, height: 200, border: "5px solid #999"}>
  <Text style={textStyles} color="#999" fontSize="20px">
    Drop items here
  </Text>
</DragAndDrop>

Properties

Props Type Required Values Default Description
dragging bool false Show that the item is being dragged now.
isDropZone bool false Sets the component as a dropzone
onDrop function Occurs when the dragged element is dropped on the drop target