Skip to content

Commit

Permalink
fix: dragOver가 두번 보이는 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
dmdgpdi committed Dec 13, 2024
1 parent 53dd91e commit f383549
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { CSSProperties, PropsWithChildren } from 'react';
import { useDraggable } from '@dnd-kit/core';
import { CSS } from '@dnd-kit/utilities';
import { draggableStyle } from './recommendPickDraggable.css';
import { RecommendPickCategoryType, RecommendPickType } from '@/types';

export function RecommendPickDraggable({
Expand All @@ -27,7 +28,8 @@ export function RecommendPickDraggable({
ref={setNodeRef}
{...attributes}
{...listeners}
style={isDragging ? { ...style, opacity: 0 } : {}}
style={style}
className={isDragging ? draggableStyle : ''}
>
{children}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { style } from '@vanilla-extract/css';

export const draggableStyle = style({
opacity: '0',
});

0 comments on commit f383549

Please sign in to comment.