Skip to content

Commit 2585de8

Browse files
committed
style: enhance drag-and-drop cursor feedback
1 parent 4cf6241 commit 2585de8

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/components/PageTreeListView.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ export default function PageTreeListViewClient({
13181318
isMovePending={isMovePending}
13191319
titleCellAccessor={useAsTitle}
13201320
/>
1321-
<DragOverlay dropAnimation={null}>
1321+
<DragOverlay dropAnimation={null} style={{ cursor: 'grabbing' }}>
13221322
{activeDragPreviewPath ? (
13231323
<div className="pages-hierarchy-drag-overlay">{activeDragPreviewPath}</div>
13241324
) : null}

src/components/PageTreeListView.module.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@
228228
}
229229

230230
.root :global(.pages-hierarchy-cell__drag-handle) {
231+
cursor: grab;
231232
margin-inline-end: 3px;
232233
touch-action: none;
233234
}
@@ -241,6 +242,11 @@
241242
color: var(--theme-text);
242243
}
243244

245+
.root :global(.pages-hierarchy-cell__drag-handle:active:not(:disabled)),
246+
.root :global(.pages-hierarchy-cell__drag-handle--active:not(:disabled)) {
247+
cursor: grabbing;
248+
}
249+
244250
.root :global(.pages-hierarchy-cell__drag-handle svg) {
245251
block-size: 0.95rem;
246252
inline-size: 0.95rem;
@@ -285,9 +291,10 @@
285291
font-size: 0.95rem;
286292
font-weight: 500;
287293
inline-size: max-content;
288-
margin-inline-start: 1rem;
294+
margin-inline-start: 2rem;
289295
padding: 0.65rem 0.85rem;
290296
pointer-events: none;
297+
transform: translateY(calc(0.75rem - 50%));
291298
white-space: nowrap;
292299
}
293300

0 commit comments

Comments
 (0)