Skip to content

Commit a5ef3a6

Browse files
committed
chore(contextual-help): add mod to allow max-width
1 parent ca3697d commit a5ef3a6

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

.changeset/spicy-boats-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@spectrum-css/contextualhelp": patch
3+
---
4+
5+
Added a --mod property to allow consumers to set a max-width property to contextual help component.

components/contextualhelp/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323

2424
position: relative;
2525
min-inline-size: var(--mod-spectrum-contextual-help-minimum-width, var(--spectrum-contextual-help-minimum-width));
26+
27+
/* Allow users to customize max-width of a contextual help component - SWC Issue #4791 */
28+
max-inline-size: var(--mod-spectrum-contextual-help-maximum-width);
2629
}
2730

2831
.spectrum-ContextualHelp-button {

components/contextualhelp/metadata/metadata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"--mod-spectrum-contextual-help-content-spacing",
1616
"--mod-spectrum-contextual-help-heading-size",
1717
"--mod-spectrum-contextual-help-link-spacing",
18+
"--mod-spectrum-contextual-help-maximum-width",
1819
"--mod-spectrum-contextual-help-minimum-width",
1920
"--mod-spectrum-contextual-help-padding"
2021
],

components/contextualhelp/metadata/mods.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
| `--mod-spectrum-contextual-help-content-spacing` |
77
| `--mod-spectrum-contextual-help-heading-size` |
88
| `--mod-spectrum-contextual-help-link-spacing` |
9+
| `--mod-spectrum-contextual-help-maximum-width` |
910
| `--mod-spectrum-contextual-help-minimum-width` |
1011
| `--mod-spectrum-contextual-help-padding` |

0 commit comments

Comments
 (0)