Skip to content

Commit 9395d66

Browse files
author
Yuraima Estevez
committed
add feature flag
1 parent 9d9889a commit 9395d66

File tree

3 files changed

+86
-13
lines changed

3 files changed

+86
-13
lines changed

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

Lines changed: 80 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,21 @@ $button-size: 20px;
99
align-items: center;
1010
min-height: 28px;
1111
padding: 0 var(--p-space-2);
12-
// TODO which secondary bg color? new or existing?
1312
background-color: var(--p-color-bg-strong);
14-
border-radius: var(--p-border-radius-2);
15-
// TODO need secondary-text-on-fill color token
13+
border-radius: var(--p-border-radius-1);
1614
color: var(--p-color-text);
15+
line-height: 0;
16+
17+
#{$se23} & {
18+
background-color: var(--p-color-bg-strong);
19+
border: var(--p-border-width-1) solid var(--p-color-bg-strong);
20+
// stylelint-disable-next-line -- se23 6px token
21+
padding: 0 6px;
22+
border-radius: var(--p-border-radius-2);
23+
// stylelint-disable-next-line -- se23 token
24+
color: #303030;
25+
min-height: $height;
26+
}
1727

1828
&.disabled {
1929
transition: none;
@@ -23,6 +33,18 @@ $button-size: 20px;
2333
svg {
2434
fill: var(--p-color-icon-disabled);
2535
}
36+
37+
#{$se23} & {
38+
transition: none;
39+
background: var(--p-color-bg-disabled);
40+
border-color: var(--p-color-bg-disabled);
41+
color: var(--p-color-text-disabled);
42+
43+
// stylelint-disable-next-line -- se23 ignore s combinator max
44+
svg {
45+
fill: var(--p-color-icon-disabled);
46+
}
47+
}
2648
}
2749

2850
&.clickable {
@@ -37,10 +59,14 @@ $button-size: 20px;
3759
line-height: var(--p-font-line-height-2);
3860

3961
&:hover {
40-
// TODO need subdued-fill token
4162
background: var(--p-color-bg-strong-hover);
42-
// TODO need secondary-border-l2
43-
// border-color: var(--p-color-secondary-border-l2)
63+
64+
#{$se23} & {
65+
// stylelint-disable-next-line -- se23 color-subduedbg-fill
66+
background: #f3f3f3;
67+
// stylelint-disable-next-line -- se23 color-border-subdued
68+
border: var(--p-border-width-1) solid #ebebeb;
69+
}
4470
}
4571

4672
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
@@ -53,10 +79,14 @@ $button-size: 20px;
5379
}
5480

5581
&:active {
56-
// TODO need secondary-fill-l2
5782
background: var(--p-color-bg-strong-hover);
58-
// TODO need secondary-border-l2
59-
// border-color: var(--p-secondary-borderl2);
83+
84+
#{$se23} & {
85+
// stylelint-disable-next-line -- se23 color-bg-strong-hover
86+
background: #d4d4d4;
87+
// stylelint-disable-next-line -- se23 color-bg-strong-hover
88+
border: var(--p-border-width-1) solid #d4d4d4;
89+
}
6090
}
6191

6292
&:disabled {
@@ -74,10 +104,21 @@ $button-size: 20px;
74104

75105
&.removable {
76106
padding-right: 0;
107+
108+
#{$se23} & {
109+
padding-right: 0;
110+
}
77111
}
78112

79113
&.linkable {
80114
padding: 0;
115+
116+
#{$se23} &:hover {
117+
// stylelint-disable-next-line -- se23 color-subduedbg-fill
118+
background: #f3f3f3;
119+
// stylelint-disable-next-line -- se23 color-border-subdued
120+
border: var(--p-border-width-1) solid #ebebeb;
121+
}
81122
}
82123

83124
@media #{$p-breakpoints-sm-up} {
@@ -86,14 +127,19 @@ $button-size: 20px;
86127
}
87128

88129
.TagText {
130+
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
131+
font-size: 13px;
89132
line-height: var(--p-font-line-height-2);
90133
min-height: $height;
91134
padding: var(--p-space-1) 0;
92135
overflow: hidden;
93136
text-overflow: ellipsis;
94137
white-space: nowrap;
95138
vertical-align: middle;
96-
// TODO need font-weight 450 token
139+
140+
#{$se23} & {
141+
padding: 0;
142+
}
97143

98144
@media #{$p-breakpoints-sm-up} {
99145
font-size: var(--p-font-size-75);
@@ -109,7 +155,16 @@ $button-size: 20px;
109155
height: $button-size;
110156
width: $button-size;
111157
margin: 0 var(--p-space-1);
112-
border-radius: var(--p-border-radius-2);
158+
border-radius: var(--p-border-radius-full);
159+
160+
#{$se23} .removable.linkable & {
161+
margin-left: var(--p-space-05);
162+
}
163+
164+
#{$se23} & {
165+
// stylelint-disable-next-line -- se23 7px token
166+
border-radius: 7px;
167+
}
113168

114169
svg {
115170
fill: var(--p-color-icon);
@@ -155,6 +210,11 @@ $button-size: 20px;
155210
min-height: $height;
156211
padding: 0 var(--p-space-2);
157212

213+
#{$se23} & {
214+
min-height: $height;
215+
padding: 0;
216+
}
217+
158218
.LinkText {
159219
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
160220
@include truncate;
@@ -164,6 +224,10 @@ $button-size: 20px;
164224
padding-top: var(--p-space-1);
165225
padding-bottom: var(--p-space-1);
166226

227+
#{$se23} & {
228+
padding: 0;
229+
}
230+
167231
@media #{$p-breakpoints-sm-up} {
168232
font-size: var(--p-font-size-75);
169233
padding-top: var(--p-space-05);
@@ -183,6 +247,11 @@ $button-size: 20px;
183247
&:hover {
184248
background: var(--p-color-bg-strong-hover);
185249
text-decoration: underline;
250+
251+
#{$se23} & {
252+
// stylelint-disable-next-line -- se23 color-subduedbg-fill
253+
background: #f3f3f3;
254+
}
186255
}
187256

188257
&.segmented {

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

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

1010
export function Default() {
11-
return <Tag>Wholesale</Tag>;
11+
return (
12+
<LegacyStack>
13+
<Tag>Wholesale</Tag>
14+
<Tag disabled>Wholesale</Tag>
15+
</LegacyStack>
16+
);
1217
}
1318

1419
export function Removable() {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export function Tag({
8181
onMouseUp={handleMouseUpByBlurring}
8282
disabled={disabled}
8383
>
84-
{/* TODO update to new x icon */}
8584
<Icon source={CancelSmallMinor} />
8685
</button>
8786
) : null;

0 commit comments

Comments
 (0)