Skip to content

Commit 616f2a7

Browse files
authored
fix: use new tag to hide storybook foundations stories (#3474)
Storybook foundations pages now display as a single page instead of in folders with their example stories appearing. These now use the newer !dev tag to hide them. The old custom "foundation" tag was previously used to hide them, but this tag is no longer used. Also fixes some linter errors encountered during commit; a couple unused variables and incorrect typeof comparisons.
1 parent 9d7f088 commit 616f2a7

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

.changeset/plenty-trees-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@spectrum-css/preview": patch
3+
---
4+
5+
Updates the tags used by the stories in the "Foundations" documentation, so hidden stories remain hidden on the sidebar.

.storybook/foundations/corner-rounding/action-button-corner-rounding.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
handles: ["click .spectrum-ActionButton:not([disabled])"],
1515
},
1616
},
17-
tags: ['foundation'],
17+
tags: ['!dev'],
1818
};
1919

2020
const ActionButton = (args, context) => html`

.storybook/foundations/corner-rounding/checkbox-corner-rounding.stories.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ export default {
1515
handles: ['click input[type="checkbox"]'],
1616
},
1717
},
18-
tags: ['foundation'],
18+
tags: ['!dev'],
1919
};
2020

21-
const Checkbox = ({
22-
customStyles = {},
23-
isChecked = false,
24-
...args
25-
} = {}, context = {}) => html`
21+
const Checkbox = (args = {}, context = {}) => html`
2622
<div style="padding: 1rem 0;">
2723
${Template({ ...args, iconName: undefined }, context)}
2824
</div>

.storybook/foundations/corner-rounding/corner-rounding.stories.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export default {
1010
args: {
1111
rootClass: "spectrum-Foundations-Example-CornerRounding",
1212
},
13-
tags: ["foundation"],
13+
tags: ["!dev"],
1414
};
1515

16-
const CornerRadiusGroup = ({ customStyles = {}, ...args }, context) => html`
16+
const CornerRadiusGroup = (args = {}, context = {}) => html`
1717
<div>
1818
<table class="spectrum-Foundations-Example-CornerRounding-table">
1919
<thead>

.storybook/foundations/down-state/button-down-state.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
handles: ["click .spectrum-Button"],
1414
},
1515
},
16-
tags: ["foundation"],
16+
tags: ["!dev"],
1717
};
1818

1919
export const ButtonDownState = Template.bind({});

.storybook/foundations/down-state/checkbox-down-state.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
handles: ["click input[type=\"checkbox\"]"],
1414
},
1515
},
16-
tags: ["foundation"],
16+
tags: ["!dev"],
1717
};
1818

1919
export const CheckboxDownState = Template.bind({});

.storybook/foundations/drop-shadow/drop-shadow.stories.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
description:
88
"Drop shadows draw attention and give the appearance of depth. By default, this style is used to show elevation, when content appears on top of other content.",
99
component: "Drop shadow",
10-
tags: ["foundation"],
10+
tags: ["!dev"],
1111
};
1212

1313
const DropShadowSwatch = ({
@@ -19,9 +19,9 @@ const DropShadowSwatch = ({
1919
class=${classMap({
2020
[rootClass]: true,
2121
[`${rootClass}--${variant}-drop-shadow`]:
22-
typeof variant !== undefined && !!isDropShadow,
22+
typeof variant !== "undefined" && !!isDropShadow,
2323
[`${rootClass}--${variant}-box-shadow`]:
24-
typeof variant !== undefined && !isDropShadow,
24+
typeof variant !== "undefined" && !isDropShadow,
2525
})}
2626
></div>
2727
`;

0 commit comments

Comments
 (0)