MCPcopy Create free account
hub / github.com/experdot/pointer / DraggableTab

Function DraggableTab

src/renderer/src/components/layout/Tabs/index.tsx:39–56  ·  view source on GitHub ↗
({ id, children }: DraggableTabProps)

Source from the content-addressed store, hash-verified

37}
38
39function DraggableTab({ id, children }: DraggableTabProps): React.JSX.Element {
40 const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
41 id
42 })
43
44 const style: React.CSSProperties = {
45 transform: CSS.Transform.toString(transform),
46 transition,
47 opacity: isDragging ? 0.5 : 1,
48 cursor: 'move'
49 }
50
51 return (
52 <div ref={setNodeRef} style={style} {...attributes} {...listeners}>
53 {children}
54 </div>
55 )
56}
57
58export function Tabs(): React.JSX.Element {
59 const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected