2024-03-13 06:56:10 +00:00
|
|
|
import { forwardRef } from "react";
|
|
|
|
|
|
|
|
export const KanbanIssueBlockLoader = forwardRef<HTMLSpanElement>((props, ref) => (
|
|
|
|
<span ref={ref} className="block h-28 m-1.5 animate-pulse bg-custom-background-80 rounded" />
|
|
|
|
));
|
|
|
|
|
2024-02-13 13:42:10 +00:00
|
|
|
export const KanbanLayoutLoader = ({ cardsInEachColumn = [2, 3, 2, 4, 3] }: { cardsInEachColumn?: number[] }) => (
|
|
|
|
<div className="flex gap-5 px-3.5 py-1.5 overflow-x-auto">
|
|
|
|
{cardsInEachColumn.map((cardsInColumn, columnIndex) => (
|
2024-03-13 06:56:10 +00:00
|
|
|
<div key={columnIndex} className="flex flex-col gap-3">
|
2024-02-13 13:42:10 +00:00
|
|
|
<div className="flex items-center justify-between h-9 w-80">
|
2024-03-13 06:56:10 +00:00
|
|
|
<div className="flex item-center">
|
|
|
|
<span className="h-6 w-6 bg-custom-background-80 rounded animate-pulse" />
|
|
|
|
<span className="h-6 w-24 bg-custom-background-80 rounded animate-pulse" />
|
2024-02-13 13:42:10 +00:00
|
|
|
</div>
|
2024-03-13 06:56:10 +00:00
|
|
|
<span className="h-6 w-6 bg-custom-background-80 rounded animate-pulse" />
|
2024-02-13 13:42:10 +00:00
|
|
|
</div>
|
|
|
|
{Array.from({ length: cardsInColumn }, (_, cardIndex) => (
|
2024-03-13 06:56:10 +00:00
|
|
|
<KanbanIssueBlockLoader key={cardIndex} />
|
2024-02-13 13:42:10 +00:00
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
);
|