Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/components/ui/Card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ const Card: React.FC<CardProps> = ({
const element = descriptionRef.current;
if (!element) return;

// hover 상태에서는 원본 텍스트를 보여줌
if (variant === 'small' && state === 'hover') {
setTruncatedDescription(description);
element.textContent = description; // DOM에도 원본 텍스트 반영
return;
}

// 원래 텍스트로 초기화
element.textContent = description;

Expand Down Expand Up @@ -153,7 +160,12 @@ const Card: React.FC<CardProps> = ({
ref={descriptionRef}
className="body-sm text-layout-grey6 mb-[16px]"
style={{
maxHeight: variant === 'small' && state !== 'hover' ? '44px' : 'calc(1.5em * 3)',
maxHeight:
variant === 'small' && state !== 'hover'
? '44px'
: variant === 'small' && state === 'hover'
? 'none'
: 'calc(1.5em * 3)',
overflow: 'hidden',
}}
>
Expand Down