Add reorderable tabs with global persistence (#347)

This commit is contained in:
Gregory Schier
2026-01-05 14:58:16 -08:00
committed by GitHub
parent 412d7a7654
commit e818c349cc
12 changed files with 426 additions and 118 deletions

View File

@@ -5,19 +5,28 @@ import { memo } from 'react';
interface Props {
className?: string;
style?: CSSProperties;
orientation?: 'horizontal' | 'vertical';
}
export const DropMarker = memo(
function DropMarker({ className, style }: Props) {
function DropMarker({ className, style, orientation = 'horizontal' }: Props) {
return (
<div
style={style}
className={classNames(
className,
'relative w-full h-0 overflow-visible pointer-events-none',
'absolute pointer-events-none z-50',
orientation === 'horizontal' && 'w-full',
orientation === 'vertical' && 'w-0 top-0 bottom-0',
)}
>
<div className="absolute z-50 left-2 right-2 -bottom-[0.1rem] h-[0.2rem] bg-primary rounded-full" />
<div
className={classNames(
'absolute bg-primary rounded-full',
orientation === 'horizontal' && 'left-2 right-2 -bottom-[0.1rem] h-[0.2rem]',
orientation === 'vertical' && '-left-[0.1rem] top-0 bottom-0 w-[0.2rem]',
)}
/>
</div>
);
},