From dbc24c57871f44a75c0ea2194ec1d84ef315ec68 Mon Sep 17 00:00:00 2001 From: seojin15 Date: Fri, 28 Aug 2026 00:15:39 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20chip=20fill=20=ED=83=80=EC=9E=85=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/components/ui/chip/chip.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/shared/components/ui/chip/chip.tsx b/src/shared/components/ui/chip/chip.tsx index 56ac71e0..f45cd367 100644 --- a/src/shared/components/ui/chip/chip.tsx +++ b/src/shared/components/ui/chip/chip.tsx @@ -10,13 +10,19 @@ type ChipSize = 'sm' | 'md'; const chipBase = 'inline-flex shrink-0 items-center justify-center whitespace-nowrap rounded-[30px] border border-gray-200 bg-white py-2 text-gray-800'; -const chipActive = 'border-mint-300 bg-mint-100 text-mint-300'; +const chipTypeStyles = { + line: 'border-mint-300 bg-mint-100 text-mint-300', + fill: 'border-gray-800 bg-gray-800 text-white', +}; + +type ChipType = 'line' | 'fill'; const chipDisabled = 'border-gray-200 bg-gray-50 text-gray-200'; interface ChipProps extends React.HTMLAttributes { size?: ChipSize; active?: boolean; + variant?: ChipType; } interface ChipButtonProps extends Omit< @@ -25,12 +31,14 @@ interface ChipButtonProps extends Omit< > { size?: ChipSize; active?: boolean; + variant?: ChipType; } export const Chip = ({ size = 'sm', className, active = false, + variant = 'line', ...props }: ChipProps) => { return ( @@ -38,7 +46,7 @@ export const Chip = ({ className={cn( chipBase, chipSizeStyles[size], - active && chipActive, + active && chipTypeStyles[variant], className, )} {...props} @@ -51,6 +59,7 @@ export const ChipButton = ({ className, active = false, disabled, + variant = 'line', ...props }: ChipButtonProps) => { return ( @@ -61,7 +70,7 @@ export const ChipButton = ({ className={cn( chipBase, chipSizeStyles[size], - active && chipActive, + active && chipTypeStyles[variant], disabled && chipDisabled, className, )}