Skip to content

Commit 23ab0e6

Browse files
docs(contextualhelp): expand documentation (#3560)
* docs(contextualhelp): add docs for top-popoover and max-width * docs(contextualhelp): add max-width popover test case
1 parent 212d197 commit 23ab0e6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Diff for: components/contextualhelp/stories/contextualhelp.stories.js

+6
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ WithLink.parameters = {
130130
};
131131
WithLink.storyName = "Default - info icon with link";
132132

133+
/**
134+
* In order to further customize the contextual help popover, implementations can set `--mod-spectrum-contextual-help-popover-maximum-width` to their desired max width.
135+
*/
133136
export const MaxWidthPopover = Template.bind({});
134137
MaxWidthPopover.tags = ["!dev"];
135138
MaxWidthPopover.args = {
@@ -149,6 +152,9 @@ MaxWidthPopover.parameters = {
149152
};
150153
MaxWidthPopover.storyName = "Default - max width popover";
151154

155+
/**
156+
* 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).
157+
*/
152158
export const TopPopover = Template.bind({});
153159
TopPopover.tags = ["!dev"];
154160
TopPopover.args = {

Diff for: components/contextualhelp/stories/contextualhelp.test.js

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ export const ContextualHelpGroup = Variants({
1111
"margin-bottom": "170px",
1212
},
1313
},
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",
20+
},
21+
},
1422
{
1523
testHeading: "With link",
1624
customStyles: {

0 commit comments

Comments
 (0)