({ id, children }: DraggableTabProps)
| 37 | } |
| 38 | |
| 39 | function 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 | |
| 58 | export function Tabs(): React.JSX.Element { |
| 59 | const { |
nothing calls this directly
no outgoing calls
no test coverage detected