Skip to content

Commit 048ad0c

Browse files
committed
feat : 장소말풍선 컨테이너
1 parent 95ca165 commit 048ad0c

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed
Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import { Icon } from '@/shared/icons';
2-
import { cva, type VariantProps } from 'class-variance-authority';
2+
import { cva } from 'class-variance-authority';
33
import { cn } from '@/shared/lib';
44
import Image from 'next/image';
55

6-
76
interface LocationBubbleProps {
87
name: string;
9-
imageSrc?: string;
10-
className?: string;
8+
imageSrc?: string;
9+
className?: string;
1110
}
1211

13-
1412
const bubbleVariants = cva(
15-
'relative flex flex-col w-[20.4rem] h-[17.25rem] bg-white rounded-[2rem] shadow-[0_4px_7px_0_rgba(0,0,0,0.30)] overflow-hidden',
13+
'relative flex flex-col w-[20.4rem] h-[15.5rem] px-[1.1rem] pt-[1.35rem] bg-white rounded-[2rem] shadow-[0_0.7rem_0.7rem_0_rgba(0,0,0,0.25)]',
1614
);
1715

1816
const LocationBubble = ({ name, imageSrc, className }: LocationBubbleProps) => {
@@ -26,34 +24,42 @@ const LocationBubble = ({ name, imageSrc, className }: LocationBubbleProps) => {
2624
alt={name}
2725
fill
2826
className='object-cover'
29-
sizes='(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 204px'
27+
sizes='(max-width: 768px) 100vw, 204px'
3028
loading='lazy'
3129
/>
3230
) : (
3331
<div className='absolute inset-0 bg-gray-200' />
3432
)}
3533
</div>
3634

37-
{/* 지도핀 + 장소 이름 + 뒤로가기아이콘 영역 */}
38-
<div className='flex items-center justify-between px-[1.1rem] py-[0.6rem]'>
39-
<div className='flex items-center gap-[0.6rem]'>
40-
<Icon name='MapPin' size={24} color='gray-200' />
35+
{/* 지도핀 + 장소 이름 + 아이콘 */}
36+
<div className='flex items-center justify-between w-full mt-[0.6rem]'>
37+
<div className='flex items-center gap-[0.6rem] min-w-0'>
38+
<Icon name='MapPin' size={24} color='gray-300' />
4139
<span className='text-label-lg truncate'>{name}</span>
4240
</div>
4341

44-
<Icon name='backto' size={24} color='gray-300' className='rotate-180'/>
42+
<div className='flex-shrink-0'>
43+
<Icon
44+
name='backto'
45+
size={24}
46+
color='gray-300'
47+
className='rotate-180'
48+
/>
49+
</div>
4550
</div>
4651

47-
{/* 꼬리 */}
52+
{/* 말풍선 꼬리 */}
4853
<div
49-
className='absolute left-1/2 -bottom-[1rem] -translate-x-1/2 w-0 h-0
50-
border-l-[1.2rem] border-l-transparent
51-
border-r-[1.2rem] border-r-transparent
52-
border-t-[1.2rem] border-t-white
53-
drop-shadow-[0_4px_7px_rgba(0,0,0,0.3)]'
54+
className='
55+
absolute left-1/2 -bottom-[1.8rem] -translate-x-1/2
56+
w-[2.4rem] h-[2.7rem] bg-white
57+
rounded-b-[2rem]
58+
[clip-path:polygon(50%_100%,68%_88%,100%_30%,0_30%,32%_88%)]
59+
'
5460
/>
5561
</div>
5662
);
5763
};
5864

59-
export default LocationBubble;
65+
export default LocationBubble;

0 commit comments

Comments
 (0)