DocSpace-buildtools/packages/components/drag-and-drop
2023-07-25 13:53:32 +02:00
..
drag-and-drop.stories.js Web: Components: fixed onDrop in DragAndDrop story 2023-04-05 15:55:42 +05:00
get-files-from-event.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
index.js Web: Components: DragAndDrop - added description 2023-04-18 19:44:36 +05:00
README.md Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
styled-drag-and-drop.js Web: Components: Adapt drag and drop component to RTL 2023-07-25 13:53:32 +02:00

DragAndDrop

Drag And Drop component can be used as Dropzone

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

import DragAndDrop from "@docspace/components/drag-and-drop";
<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