16 lines
474 B
TypeScript
16 lines
474 B
TypeScript
|
|
import type { DropPlacement } from "../lib/reorder-items";
|
||
|
|
|
||
|
|
/** Marca el punto de inserción sin desplazar controles ni interceptar el arrastre. */
|
||
|
|
export function ReorderDropIndicator({ placement }: { placement: DropPlacement | undefined }) {
|
||
|
|
if (!placement) {
|
||
|
|
return null;
|
||
|
|
}
|
||
|
|
|
||
|
|
return (
|
||
|
|
<span
|
||
|
|
aria-hidden="true"
|
||
|
|
className={`pointer-events-none absolute inset-x-0 z-10 h-1 bg-primary ${placement === "before" ? "top-0" : "bottom-0"}`}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|