mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 09:53:48 +00:00
refactor: small style tweaks
- cursor styles on dnd
This commit is contained in:
committed by
Carlos Valente
parent
3ce539af2a
commit
8a7f8c8ebc
+3
-1
@@ -15,13 +15,15 @@ interface SortableCellProps {
|
||||
export function SortableCell({ header, injectedStyles, children }: SortableCellProps) {
|
||||
const { column, colSpan } = header;
|
||||
|
||||
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({
|
||||
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
|
||||
id: column.id,
|
||||
});
|
||||
|
||||
// build drag styles
|
||||
const dragStyle = {
|
||||
...injectedStyles,
|
||||
zIndex: isDragging ? 2 : 'inherit',
|
||||
cursor: isDragging ? 'grabbing' : 'grab',
|
||||
transform: CSS.Translate.toString(transform),
|
||||
transition,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user