MCPcopy Create free account
hub / github.com/PaulleDemon/PyUIBuilder / Draggable

Function Draggable

src/components/utils/draggableDnd.js:6–17  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

4
5
6function Draggable(props) {
7 const {attributes, listeners, setNodeRef, transform} = useDraggable({
8 id: props.id,
9 data: {title: props.children}
10 })
11 const style = transform ? {
12 transform: CSS.Translate.toString(transform),
13 } : undefined
14
15
16 return (
17 <button className={`tw-bg-transparent tw-outline-none tw-border-none ${props.className}`}
18 ref={setNodeRef}
19 style={style}
20 {...listeners}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected