Skip to content

Commit 9ff72e5

Browse files
committed
[#41] 🐛 fix twMerge class name merging issues along to the test result
1 parent b57c3d3 commit 9ff72e5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/common/chip/Chip.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type ChipProps = {
77
}
88

99
const baseStyle =
10-
'flex h-28 items-center justify-center rounded-4 bg-gray-200 px-6 text-body3 font-medium text-gray-500'
10+
'flex h-28 items-center justify-center rounded-4 px-6 text-body3 font-medium'
1111

1212
const styleByLabel: Record<string, string> = {
1313
'모집 중': 'bg-blue-100 text-blue-500',
@@ -20,8 +20,11 @@ const styleByLabel: Record<string, string> = {
2020
기타: 'bg-orange-100 text-orange-500',
2121
}
2222

23-
export const Chip = ({ label, className = '' }: ChipProps): JSX.Element => {
23+
export const Chip = ({
24+
label,
25+
className = 'bg-gray-200 text-gray-500',
26+
}: ChipProps): JSX.Element => {
2427
const labelStyle = styleByLabel[label] || ''
25-
const chipStyle = twMerge(baseStyle, clsx(labelStyle), className)
28+
const chipStyle = clsx(baseStyle, labelStyle, className)
2629
return <span className={chipStyle}>{label}</span>
2730
}

0 commit comments

Comments
 (0)