Skip to content

Commit 7fc9acd

Browse files
authored
Removes z-index from "x" button in tokens (#2689)
* removes z-index from token remove buttons * updates snapshots * adds changeset
1 parent 50428e7 commit 7fc9acd

File tree

3 files changed

+5
-52
lines changed

3 files changed

+5
-52
lines changed

.changeset/modern-avocados-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
Removes useless z-index from the remove button in tokens

src/Token/Token.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,6 @@ const Token = forwardRef<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement
9898
size={size}
9999
isParentInteractive={isTokenInteractive(props)}
100100
aria-hidden={hasMultipleActionTargets ? 'true' : 'false'}
101-
sx={
102-
hasMultipleActionTargets
103-
? {
104-
position: 'relative',
105-
zIndex: '1',
106-
}
107-
: {}
108-
}
109101
/>
110102
) : null}
111103
</TokenBase>

src/__tests__/__snapshots__/TextInputWithTokens.test.tsx.snap

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ exports[`TextInputWithTokens renders a leadingVisual and trailingVisual 1`] = `
218218
margin-left: 8px;
219219
height: 32px;
220220
width: 32px;
221-
position: relative;
222-
z-index: 1;
223221
}
224222
225223
.c6:hover,
@@ -962,8 +960,6 @@ exports[`TextInputWithTokens renders a truncated set of tokens 1`] = `
962960
margin-left: 8px;
963961
height: 32px;
964962
width: 32px;
965-
position: relative;
966-
z-index: 1;
967963
}
968964
969965
.c6:hover,
@@ -1561,8 +1557,6 @@ exports[`TextInputWithTokens renders at a maximum height when specified 1`] = `
15611557
margin-left: 8px;
15621558
height: 32px;
15631559
width: 32px;
1564-
position: relative;
1565-
z-index: 1;
15661560
}
15671561
15681562
.c6:hover,
@@ -2253,8 +2247,6 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 1`] = `
22532247
margin-left: 4px;
22542248
height: 16px;
22552249
width: 16px;
2256-
position: relative;
2257-
z-index: 1;
22582250
}
22592251
22602252
.c6:hover,
@@ -2945,8 +2937,6 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 2`] = `
29452937
margin-left: 4px;
29462938
height: 20px;
29472939
width: 20px;
2948-
position: relative;
2949-
z-index: 1;
29502940
}
29512941
29522942
.c6:hover,
@@ -3630,8 +3620,6 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 3`] = `
36303620
margin-left: 8px;
36313621
height: 24px;
36323622
width: 24px;
3633-
position: relative;
3634-
z-index: 1;
36353623
}
36363624
36373625
.c6:hover,
@@ -4315,8 +4303,6 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 4`] = `
43154303
margin-left: 8px;
43164304
height: 32px;
43174305
width: 32px;
4318-
position: relative;
4319-
z-index: 1;
43204306
}
43214307
43224308
.c6:hover,
@@ -5000,8 +4986,6 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 5`] = `
50004986
margin-left: 8px;
50014987
height: 32px;
50024988
width: 32px;
5003-
position: relative;
5004-
z-index: 1;
50054989
}
50064990
50074991
.c6:hover,
@@ -5687,8 +5671,6 @@ exports[`TextInputWithTokens renders tokens on a single line when specified 1`]
56875671
margin-left: 8px;
56885672
height: 32px;
56895673
width: 32px;
5690-
position: relative;
5691-
z-index: 1;
56925674
}
56935675
56945676
.c6:hover,
@@ -6772,8 +6754,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
67726754
margin-left: 8px;
67736755
height: 32px;
67746756
width: 32px;
6775-
position: relative;
6776-
z-index: 1;
67776757
}
67786758
67796759
.c6:hover,
@@ -7512,8 +7492,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
75127492
margin-left: 8px;
75137493
height: 32px;
75147494
width: 32px;
7515-
position: relative;
7516-
z-index: 1;
75177495
}
75187496
75197497
.c8:hover,
@@ -8284,8 +8262,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
82848262
margin-left: 8px;
82858263
height: 32px;
82868264
width: 32px;
8287-
position: relative;
8288-
z-index: 1;
82898265
}
82908266
82918267
.c6:hover,
@@ -9033,8 +9009,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
90339009
margin-left: 8px;
90349010
height: 32px;
90359011
width: 32px;
9036-
position: relative;
9037-
z-index: 1;
90389012
}
90399013
90409014
.c9:hover,
@@ -9852,8 +9826,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
98529826
margin-left: 8px;
98539827
height: 32px;
98549828
width: 32px;
9855-
position: relative;
9856-
z-index: 1;
98579829
}
98589830
98599831
.c9:hover,
@@ -10671,8 +10643,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
1067110643
margin-left: 8px;
1067210644
height: 32px;
1067310645
width: 32px;
10674-
position: relative;
10675-
z-index: 1;
1067610646
}
1067710647
1067810648
.c9:hover,
@@ -11484,8 +11454,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
1148411454
margin-left: 8px;
1148511455
height: 32px;
1148611456
width: 32px;
11487-
position: relative;
11488-
z-index: 1;
1148911457
}
1149011458
1149111459
.c6:hover,
@@ -12265,8 +12233,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
1226512233
margin-left: 8px;
1226612234
height: 32px;
1226712235
width: 32px;
12268-
position: relative;
12269-
z-index: 1;
1227012236
}
1227112237
1227212238
.c8:hover,
@@ -13078,8 +13044,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
1307813044
margin-left: 8px;
1307913045
height: 32px;
1308013046
width: 32px;
13081-
position: relative;
13082-
z-index: 1;
1308313047
}
1308413048
1308513049
.c6:hover,
@@ -13875,8 +13839,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
1387513839
margin-left: 4px;
1387613840
height: 16px;
1387713841
width: 16px;
13878-
position: relative;
13879-
z-index: 1;
1388013842
}
1388113843
1388213844
.c9:hover,
@@ -14735,8 +14697,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
1473514697
margin-left: 8px;
1473614698
height: 32px;
1473714699
width: 32px;
14738-
position: relative;
14739-
z-index: 1;
1474014700
}
1474114701
1474214702
.c9:hover,
@@ -15595,8 +15555,6 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
1559515555
margin-left: 8px;
1559615556
height: 24px;
1559715557
width: 24px;
15598-
position: relative;
15599-
z-index: 1;
1560015558
}
1560115559
1560215560
.c9:hover,
@@ -16421,8 +16379,6 @@ exports[`TextInputWithTokens renders with tokens 1`] = `
1642116379
margin-left: 8px;
1642216380
height: 32px;
1642316381
width: 32px;
16424-
position: relative;
16425-
z-index: 1;
1642616382
}
1642716383
1642816384
.c6:hover,

0 commit comments

Comments
 (0)