Skip to content

Commit 40559a6

Browse files
committed
adjust colors
1 parent 450a4a7 commit 40559a6

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

polaris-react/src/components/Tag/Tag.scss

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ $button-size: 20px;
7272
@include focus-ring($size: 'wide');
7373
line-height: var(--p-font-line-height-1);
7474
padding: 0 calc(var(--p-space-1) + var(--p-space-05));
75+
76+
&:hover {
77+
background: var(--p-color-bg-strong-hover);
78+
}
79+
80+
&:active {
81+
background: var(--p-color-bg-strong-active);
82+
}
7583
}
7684
}
7785

@@ -81,6 +89,16 @@ $button-size: 20px;
8189

8290
&.linkable {
8391
padding: 0;
92+
93+
#{$se23} & {
94+
&:hover {
95+
background: var(--p-color-bg-strong-hover);
96+
}
97+
98+
&:active {
99+
background: var(--p-color-bg-strong-active);
100+
}
101+
}
84102
}
85103

86104
#{$se23} & {
@@ -173,6 +191,15 @@ $button-size: 20px;
173191
margin-left: var(--p-space-05);
174192
width: 18px;
175193
height: 18px;
194+
color: var(--p-color-icon-subdued);
195+
196+
&:hover {
197+
color: var(--p-color-icon-primary);
198+
}
199+
/* stylelint-disable-next-line selector-max-combinators -- se23 */
200+
svg {
201+
fill: currentColor;
202+
}
176203
}
177204
}
178205

@@ -234,5 +261,17 @@ $button-size: 20px;
234261
@include focus-ring('wide');
235262
border-radius: var(--p-border-radius-2);
236263
padding: 0 calc(var(--p-space-1) + var(--p-space-05));
264+
265+
&:active {
266+
background: var(--p-color-bg-strong-active);
267+
}
268+
}
269+
}
270+
271+
.linkable.removable:hover {
272+
background: var(--p-color-bg-strong-hover);
273+
/* stylelint-disable-next-line selector-max-class -- se23 */
274+
.Button {
275+
background: var(--p-color-bg-strong-active);
237276
}
238277
}

polaris-react/src/components/Tag/Tag.stories.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ export default {
88
} as ComponentMeta<typeof Tag>;
99

1010
export function Default() {
11-
return <Tag>Wholesale</Tag>;
11+
return (
12+
<HorizontalStack gap="1">
13+
<Tag>Wholesale</Tag>
14+
<Tag disabled>Disabled</Tag>
15+
<Tag url="#">With URL</Tag>
16+
</HorizontalStack>
17+
);
1218
}
1319

1420
export function Removable() {
@@ -30,7 +36,11 @@ export function Removable() {
3036
);
3137

3238
const tagMarkup = selectedTags.map((option) => (
33-
<Tag key={option} onRemove={removeTag(option)}>
39+
<Tag
40+
key={option}
41+
onRemove={removeTag(option)}
42+
disabled={option === 'Antique'}
43+
>
3444
{option}
3545
</Tag>
3646
));

0 commit comments

Comments
 (0)