[WEB-1004] feat: Pragmatic dnd implementation for Kanban (#4189)
* Pragmatic drag and drop implmentation of Kanban * refactor pragmatic dnd implementation and fix bugs * fix dnd for modules, cycles, draft and project views
This commit is contained in:
parent
384624a21b
commit
7a21855ab6
22 changed files with 756 additions and 377 deletions
21
packages/ui/src/drop-indicator.tsx
Normal file
21
packages/ui/src/drop-indicator.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import React from "react";
|
||||
import { cn } from "../helpers";
|
||||
|
||||
type Props = {
|
||||
isVisible: boolean;
|
||||
};
|
||||
|
||||
export const DropIndicator = (props: Props) => {
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
`block relative h-[2px] w-full
|
||||
before:left-0 before:relative before:block before:top-[-2px] before:h-[6px] before:w-[6px] before:rounded
|
||||
after:left-[calc(100%-6px)] after:relative after:block after:top-[-8px] after:h-[6px] after:w-[6px] after:rounded`,
|
||||
{
|
||||
"bg-custom-primary-100 before:bg-custom-primary-100 after:bg-custom-primary-100": props.isVisible,
|
||||
}
|
||||
)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
@ -12,3 +12,4 @@ export * from "./tooltip";
|
|||
export * from "./loader";
|
||||
export * from "./control-link";
|
||||
export * from "./toast";
|
||||
export * from "./drop-indicator";
|
||||
Loading…
Add table
Add a link
Reference in a new issue