Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/many-bears-bake.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Fix ellipsis truncation in `Token`
3 changes: 1 addition & 2 deletions src/Token/_TokenTextContainer.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,13 +14,12 @@ const TokenTextContainer = styled('span')<Partial<TokenBaseProps>>`
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;

// reset anchor styles
color: currentColor;
Expand Down
72 changes: 24 additions & 48 deletions src/__tests__/__snapshots__/TextInputWithTokens.test.tsx.snap
Original file line numberDiff line numberDiff line change
Expand Up@@ -257,13 +257,12 @@ exports[`TextInputWithTokens renders a leadingVisual and trailingVisual 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -1045,13 +1044,12 @@ exports[`TextInputWithTokens renders a truncated set of tokens 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -1665,13 +1663,12 @@ exports[`TextInputWithTokens renders at a maximum height when specified 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -2399,13 +2396,12 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -3133,13 +3129,12 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 2`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -3860,13 +3855,12 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 3`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -4589,13 +4583,12 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 4`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -5318,13 +5311,12 @@ exports[`TextInputWithTokens renders tokens at the specified sizes 5`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -6049,13 +6041,12 @@ exports[`TextInputWithTokens renders tokens on a single line when specified 1`]
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -6728,13 +6719,12 @@ exports[`TextInputWithTokens renders tokens without a remove button when specifi
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -7224,13 +7214,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -8008,13 +7997,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -8824,13 +8812,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -9617,13 +9604,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -10480,13 +10466,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -11343,13 +11328,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -12200,13 +12184,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -13025,13 +13008,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -13882,13 +13864,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -14721,13 +14702,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -15625,13 +15605,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -16527,13 +16506,12 @@ exports[`TextInputWithTokens renders with a loading indicator 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -17397,13 +17375,12 @@ exports[`TextInputWithTokens renders with tokens 1`] = `
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand DownExpand Up@@ -18120,13 +18097,12 @@ exports[`TextInputWithTokens renders with tokens using a custom token component
color: inherit;
font: inherit;
margin: 0;
overflow: visible;
padding: 0;
width: auto;
-webkit-font-smoothing: inherit;
-moz-osx-font-smoothing: inherit;
-webkit-appearance: none;
line-height: 1;
line-height: normal;
color: currentColor;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down
Loading