This commit is contained in:
Stijnus
2025-01-24 01:08:51 +01:00
parent 4e6f18ea1e
commit 27eab591a9
19 changed files with 1759 additions and 592 deletions

View File

@@ -36,7 +36,7 @@ const DraggableTabItem = ({
onWindowChange,
onVisibilityChange,
}: DraggableTabItemProps) => {
const [{ isDragging }, drag] = useDrag({
const [{ isDragging }, dragRef] = useDrag({
type: 'tab',
item: { type: 'tab', index, id: tab.id },
collect: (monitor) => ({
@@ -44,7 +44,7 @@ const DraggableTabItem = ({
}),
});
const [, drop] = useDrop({
const [, dropRef] = useDrop({
accept: 'tab',
hover: (item: DragItem, monitor) => {
if (!monitor.isOver({ shallow: true })) {
@@ -64,9 +64,14 @@ const DraggableTabItem = ({
},
});
const ref = (node: HTMLDivElement | null) => {
dragRef(node);
dropRef(node);
};
return (
<motion.div
ref={(node) => drag(drop(node))}
ref={ref}
initial={false}
animate={{
scale: isDragging ? 1.02 : 1,

View File

@@ -55,7 +55,7 @@ export const TabTile = ({
'border border-[#E5E5E5]/50 dark:border-[#333333]/50',
// Shadow and glass effect
'shadow-sm backdrop-blur-sm',
'shadow-sm',
'dark:shadow-[0_0_15px_rgba(0,0,0,0.1)]',
'dark:bg-opacity-50',