Skip to content

Commit

Permalink
chore(components, docs): removed auto slotting from post-togglebutton (
Browse files Browse the repository at this point in the history
  • Loading branch information
schaertim authored Dec 19, 2024
1 parent 9f1e888 commit 65ebf3d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-knives-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-components': patch
---

Removed auto slotting from `post-togglebutton` component to enable more flexible usage.
5 changes: 5 additions & 0 deletions .changeset/smooth-spoons-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': patch
---

Updated header documentation by specifying `post-togglebutton` slot explicitly.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class PostTogglebutton {
render() {
return (
<Host
slot="post-togglebutton"
data-version={version}
role="button"
tabindex="0"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</ul>

<!-- Menu button for mobile -->
<post-togglebutton>
<post-togglebutton slot="post-togglebutton">
<span class="visually-hidden-sm">Menu</span>
<post-icon aria-hidden="true" name="burger" data-showWhen="untoggled"></post-icon>
<post-icon aria-hidden="true" name="closex" data-showWhen="toggled"></post-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default html`<post-header>
</ul>
<!-- Menu button for mobile -->
<post-togglebutton>
<post-togglebutton slot="post-togglebutton">
<span class="visually-hidden-sm">Menu</span>
<post-icon aria-hidden="true" name="burger" data-showWhen="untoggled"></post-icon>
<post-icon aria-hidden="true" name="closex" data-showWhen="toggled"></post-icon>
Expand Down

0 comments on commit 65ebf3d

Please sign in to comment.