Skip to content

fix: use new tag to hide storybook foundations stories #3474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2025
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/plenty-trees-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/preview": patch
---

Updates the tags used by the stories in the "Foundations" documentation, so hidden stories remain hidden on the sidebar.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
handles: ["click .spectrum-ActionButton:not([disabled])"],
},
},
tags: ['foundation'],
tags: ['!dev'],
};

const ActionButton = (args, context) => html`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ export default {
handles: ['click input[type="checkbox"]'],
},
},
tags: ['foundation'],
tags: ['!dev'],
};

const Checkbox = ({
customStyles = {},
isChecked = false,
...args
} = {}, context = {}) => html`
const Checkbox = (args = {}, context = {}) => html`
<div style="padding: 1rem 0;">
${Template({ ...args, iconName: undefined }, context)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export default {
args: {
rootClass: "spectrum-Foundations-Example-CornerRounding",
},
tags: ["foundation"],
tags: ["!dev"],
};

const CornerRadiusGroup = ({ customStyles = {}, ...args }, context) => html`
const CornerRadiusGroup = (args = {}, context = {}) => html`
<div>
<table class="spectrum-Foundations-Example-CornerRounding-table">
<thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
handles: ["click .spectrum-Button"],
},
},
tags: ["foundation"],
tags: ["!dev"],
};

export const ButtonDownState = Template.bind({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
handles: ["click input[type=\"checkbox\"]"],
},
},
tags: ["foundation"],
tags: ["!dev"],
};

export const CheckboxDownState = Template.bind({});
Expand Down
6 changes: 3 additions & 3 deletions .storybook/foundations/drop-shadow/drop-shadow.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
description:
"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.",
component: "Drop shadow",
tags: ["foundation"],
tags: ["!dev"],
};

const DropShadowSwatch = ({
Expand All @@ -19,9 +19,9 @@ const DropShadowSwatch = ({
class=${classMap({
[rootClass]: true,
[`${rootClass}--${variant}-drop-shadow`]:
typeof variant !== undefined && !!isDropShadow,
typeof variant !== "undefined" && !!isDropShadow,
[`${rootClass}--${variant}-box-shadow`]:
typeof variant !== undefined && !isDropShadow,
typeof variant !== "undefined" && !isDropShadow,
})}
></div>
`;
Expand Down
Loading