Skip to content

Commit

Permalink
move parameters in className to be applied after to avoid override
Browse files Browse the repository at this point in the history
  • Loading branch information
Derrick-Mao committed Sep 15, 2024
1 parent 008f3d0 commit 6b0221a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/admin/Tag.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ const Tag = ({ color, text, onClick, classes, statuses }) => {
return (
<Badge
data-cy={`${text}-tag`}
className={`${classes} ${color.background} ${color.text} ${
onClick && `hover:cursor-pointer ${color.hover}`
} m-0 w-fit whitespace-nowrap rounded px-2 py-0.5 text-xs md:text-sm`}
className={`m-0 w-fit whitespace-nowrap rounded px-2 py-0.5 text-xs md:text-sm
${classes} ${color.background} ${color.text} ${
onClick && `hover:cursor-pointer ${color.hover}`
}`}
onClick={onClick}
>
{isNaN(text) ? text : statuses[text]}
Expand Down

0 comments on commit 6b0221a

Please sign in to comment.