UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

29 lines (28 loc) 673 B
// src/components/Droppable.tsx import { useDroppable } from "@dnd-kit/core"; import { useId } from "react"; import { jsx } from "react/jsx-runtime"; function Droppable(props) { const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props; const uuid = useId(); const { isOver, setNodeRef } = useDroppable({ data, disabled, id: id || uuid, resizeObserverConfig }); return /* @__PURE__ */ jsx( "div", { ...nativeProps, "data-over": isOver, "data-dropped": dropped, ref: setNodeRef, children: props.children } ); } export { Droppable }; //# sourceMappingURL=chunk-TKI2CKHH.js.map