Files
grungnet/src/components/drag/Droppable.js

19 lines
352 B
JavaScript
Raw Normal View History

2021-05-06 15:04:53 +10:00
import React from "react";
import { useDroppable } from "@dnd-kit/core";
function Droppable({ id, children, disabled, ...props }) {
2021-05-06 15:04:53 +10:00
const { setNodeRef } = useDroppable({ id, disabled });
return (
<div ref={setNodeRef} {...props}>
{children}
</div>
);
2021-05-06 15:04:53 +10:00
}
Droppable.defaultProps = {
disabled: false,
};
export default Droppable;