Skip to content

Commit a3c8c49

Browse files
spaceokasperbirch1
authored andcommitted
Simplify selected/unselected tag styling
1 parent c72a19f commit a3c8c49

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

src/stories/Library/tag/Tag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const Tag = ({
2626
onClick={() => isClickable && setSelected(!selected)}
2727
className={clsx(
2828
"tag",
29-
hasBackground || selected ? "tag--outlined-selected" : "tag--outlined",
29+
(hasBackground || selected) && "tag--fill",
3030
usesCursor && "cursor-pointer",
3131
`tag--${size}`
3232
)}

src/stories/Library/tag/tag.scss

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
display: inline-flex;
33
justify-content: center;
44
align-items: center;
5-
background-color: $c-global-secondary;
5+
outline: 1px solid $c-global-tertiary-1;
6+
padding: 8px 16px;
67
@extend %text-tags;
78

9+
&.tag--fill {
10+
background-color: $c-global-secondary;
11+
}
12+
813
&.tag--small {
914
height: 32px;
1015
padding: 0 8px;
@@ -14,17 +19,6 @@
1419
height: 40px;
1520
padding: 0 16px;
1621
}
17-
18-
&.tag--outlined {
19-
background-color: transparent;
20-
outline: 1px solid $c-global-tertiary-1;
21-
padding: 8px 16px;
22-
cursor: pointer;
23-
24-
&-selected {
25-
background-color: #eee9e5;
26-
}
27-
}
2822
}
2923

3024
.tag-icon {

0 commit comments

Comments
 (0)