Skip to content

Commit

Permalink
chore(components, docs): removed auto slotting from post-logo (#4345)
Browse files Browse the repository at this point in the history
  • Loading branch information
schaertim authored Dec 19, 2024
1 parent 3ac91be commit d4b578d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-maps-pay.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-logo` slot explicitly.
5 changes: 5 additions & 0 deletions .changeset/nice-beans-impress.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-logo` component to enable more flexible usage.
2 changes: 1 addition & 1 deletion packages/components/src/components/post-logo/post-logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class PostLogo {
const LogoTag = logoLink ? 'a' : 'span';

return (
<Host data-version={version} slot="post-logo">
<Host data-version={version}>
<LogoTag class="logo" {...(logoLink ? { href: logoLink } : {})}>
<span class="description">
<slot onSlotchange={() => this.checkDescription()}></slot>
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 @@ -18,7 +18,7 @@
<body style="min-height: 200vh">
<post-header>
<!-- Logo -->
<post-logo>Homepage</post-logo>
<post-logo slot="post-logo">Homepage</post-logo>

<!-- Meta navigation -->
<ul class="list-inline" slot="meta-navigation">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { html } from 'lit-html';

export default html`<post-header>
<!-- Logo -->
<post-logo url="/">Homepage</post-logo>
<post-logo slot="post-logo" url="/">Homepage</post-logo>
<!-- Meta navigation -->
<ul class="list-inline" slot="meta-navigation">
Expand Down

0 comments on commit d4b578d

Please sign in to comment.