Skip to content

Commit 19cd11b

Browse files
committed
fix(contextual-help): update border-radius passthrough
1 parent 8a9fdd4 commit 19cd11b

File tree

4 files changed

+8
-37
lines changed

4 files changed

+8
-37
lines changed

components/contextualhelp/dist/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"--mod-contextual-help-body-sans-serif-font-style",
1616
"--mod-contextual-help-body-sans-serif-font-weight",
1717
"--mod-contextual-help-body-size",
18-
"--mod-contextual-help-border-radius",
1918
"--mod-contextual-help-content-spacing",
2019
"--mod-contextual-help-heading-size",
2120
"--mod-contextual-help-link-spacing",
@@ -58,6 +57,7 @@
5857
"--spectrum-line-height-200",
5958
"--spectrum-picker-popover-animation-distance",
6059
"--spectrum-sans-font-family-stack",
60+
"--spectrum-spacing-100",
6161
"--spectrum-spacing-300",
6262
"--spectrum-spacing-400",
6363
"--spectrum-title-color",

components/contextualhelp/index.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
--spectrum-contextual-help-link-spacing: var(--spectrum-spacing-300);
3131
--spectrum-contextual-help-padding: var(--spectrum-spacing-400);
3232

33-
--spectrum-contextual-help-border-radius: var(--mod-contextual-help-border-radius, var(--mod-popover-corner-radius));
33+
--spectrum-contextual-help-border-radius: var(--mod-popover-corner-radius);
3434

3535
/* @passthrough start */
3636
/* stylelint-disable-next-line spectrum-tools/no-unused-custom-properties -- used to assign Popover mods */
3737
--spectrum-picker-popover-animation-distance: var(--spectrum-component-to-menu-medium);
3838

39-
--mod-popover-animation-distance: var(--spectrum-picker-popover-animation-distance);
39+
--mod-popover-animation-distance: var(--spectrum-spacing-100);
4040
--mod-popover-corner-radius: var(--spectrum-corner-radius-large-default);
4141
/* @passthrough end */
4242
}

components/contextualhelp/stories/contextualhelp.stories.js

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default {
9595
link: false,
9696
title: "Permission required",
9797
body: "Your admin must grant you permission before you can create a new document. Please contact your admin for more information.",
98-
customStyles: { "inline-size": "275px" },
98+
customStyles: { "inline-size": "var(--spectrum-contextual-help-min-inline-size)" },
9999
},
100100
parameters: {
101101
actions: {
@@ -144,28 +144,6 @@ WithLink.parameters = {
144144
};
145145
WithLink.storyName = "Default - info icon with link";
146146

147-
/**
148-
* In order to further customize the contextual help popover, implementations can set `--mod-spectrum-contextual-help-popover-maximum-width` to their desired max width.
149-
*/
150-
export const MaxWidthPopover = Template.bind({});
151-
MaxWidthPopover.tags = ["!dev"];
152-
MaxWidthPopover.args = {
153-
customStyles: {
154-
"inline-size": "275px",
155-
"--mod-spectrum-contextual-help-popover-maximum-width": "180px",
156-
"margin-bottom": "270px",
157-
},
158-
};
159-
MaxWidthPopover.parameters = {
160-
chromatic: { disableSnapshot: true },
161-
docs: {
162-
story: {
163-
height: "auto",
164-
},
165-
},
166-
};
167-
MaxWidthPopover.storyName = "Default - max width popover";
168-
169147
/**
170148
* This is an example of the contextual help component within a popover with a placement of `top`. Read more about the 22 available placement positions in the [popover documentation](/docs/components-popover--docs).
171149
*/
@@ -174,7 +152,6 @@ TopPopover.tags = ["!dev"];
174152
TopPopover.args = {
175153
popoverPlacement: "top",
176154
customStyles: {
177-
"inline-size": "275px",
178155
"margin-top": "170px",
179156
},
180157
};
@@ -190,6 +167,8 @@ TopPopover.storyName = "Default - top popover";
190167

191168
/**
192169
* When displaying help or resources to learn more, the contextual help should use the help icon. The content in this variant provides more detailed, in-depth guidance about a task, UI element, tool or keyboard shortcuts.
170+
*
171+
* All variants and positions of the contextual help component can be configured with a help icon.
193172
*/
194173
export const HelpDefault = Template.bind({});
195174
HelpDefault.tags = ["!dev"];

components/contextualhelp/stories/contextualhelp.test.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,7 @@ export const ContextualHelpGroup = Variants({
88
testHeading: "Default",
99
customStyles: {
1010
"inline-size": "275px",
11-
"margin-bottom": "170px",
12-
},
13-
},
14-
{
15-
testHeading: "Max-width popover",
16-
customStyles: {
17-
"inline-size": "275px",
18-
"margin-bottom": "275px",
19-
"--mod-spectrum-contextual-help-popover-maximum-width": "150px",
11+
"margin-bottom": "200px",
2012
},
2113
},
2214
{
@@ -32,7 +24,7 @@ export const ContextualHelpGroup = Variants({
3224
iconName: "HelpCircle",
3325
customStyles: {
3426
"inline-size": "275px",
35-
"margin-bottom": "170px",
27+
"margin-bottom": "200px",
3628
},
3729
},
3830
],

0 commit comments

Comments
 (0)