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
8 changes: 7 additions & 1 deletion src/components/common/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,27 @@ interface IconButtonProps {
icon: string;
onClick?: () => void;
className?: string; // 예외적으로 색상을 바꿔야 할 때만 (예: text-point-red)
variant?: 'default' | 'ghost';
}

export const IconButton = ({
icon,
onClick,
className = '',
variant = 'default',
}: IconButtonProps) => {
return (
<button
type="button"
onClick={onClick}
className={`
p-2 rounded-full transition-colors duration-200
hover:bg-gray-100 active:bg-gray-200
flex items-center justify-center
${
variant === 'default'
? 'hover:bg-gray-100 active:bg-gray-200' // default: 기존처럼 마우스 올리면 회색 배경
: 'hover:bg-transparent active:bg-transparent' // ghost: 마우스를 올려도 배경색 없이 투명함
}
${className}
`}
>
Expand Down