()
| 3 | import { TableLocale } from '../locale' |
| 4 | |
| 5 | export const Dragging = () => { |
| 6 | const editor = useEditableStatic() |
| 7 | const point = useTableDragPoint() |
| 8 | const count = useTableDragCount() |
| 9 | const { format } = useLocaleFormat<TableLocale>('table') |
| 10 | |
| 11 | if (!point) return null |
| 12 | const [x, y] = Editable.toRelativePosition(editor, point.x, point.y) |
| 13 | return ( |
| 14 | <div |
| 15 | tw="absolute left-0 top-0 pointer-events-none py-2 px-4 bg-blue-500 text-white opacity-80 z-10" |
| 16 | style={{ |
| 17 | transform: `translate(${x}px, ${y}px)`, |
| 18 | }} |
| 19 | > |
| 20 | <div tw="text-center text-sm"> |
| 21 | {format(TableDrag.getDragType() === 'col' ? 'moveCols' : 'moveRows', { count })} |
| 22 | </div> |
| 23 | </div> |
| 24 | ) |
| 25 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…