Skip to content
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

feat(notification): add size 's' #2606

Merged
merged 10 commits into from
Apr 24, 2024
318 changes: 318 additions & 0 deletions src/components/notification/__snapshots__/notification.spec.snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,321 @@ snapshots["sbb-notification A11y tree Firefox"] =
`;
/* end snapshot sbb-notification A11y tree Firefox */

snapshots["sbb-notification renders Dom"] =
`<sbb-notification
data-slot-names="unnamed"
data-state="opened"
disable-animation=""
size="m"
style="--sbb-notification-height: auto;"
type="info"
>
The quick brown fox jumps over the lazy dog.
</sbb-notification>
`;
/* end snapshot sbb-notification renders Dom */

snapshots["sbb-notification renders ShadowDom"] =
`<div class="sbb-notification__wrapper">
<div class="sbb-notification">
<sbb-icon
aria-hidden="true"
class="sbb-notification__icon"
data-namespace="default"
name="circle-information-small"
role="img"
>
</sbb-icon>
<span class="sbb-notification__content">
<sbb-title
aria-level="3"
class="sbb-notification__title"
level="3"
role="heading"
visual-level="5"
>
<slot name="title">
</slot>
</sbb-title>
<slot>
</slot>
</span>
<span class="sbb-notification__close-wrapper">
<sbb-divider
aria-orientation="vertical"
class="sbb-notification__divider"
orientation="vertical"
role="separator"
>
</sbb-divider>
<sbb-secondary-button
aria-label="Close message"
class="sbb-notification__close"
data-action=""
data-button=""
data-sbb-button=""
dir="ltr"
icon-name="cross-small"
role="button"
size="m"
tabindex="0"
>
</sbb-secondary-button>
</span>
</div>
</div>
`;
/* end snapshot sbb-notification renders ShadowDom */

snapshots["sbb-notification renders with a title Dom"] =
`<sbb-notification
data-slot-names="unnamed"
data-state="opened"
disable-animation=""
size="m"
style="--sbb-notification-height: auto;"
title-content="Title"
type="info"
>
The quick brown fox jumps over the lazy dog.
</sbb-notification>
`;
/* end snapshot sbb-notification renders with a title Dom */

snapshots["sbb-notification renders with a title ShadowDom"] =
`<div class="sbb-notification__wrapper">
<div class="sbb-notification">
<sbb-icon
aria-hidden="true"
class="sbb-notification__icon"
data-namespace="default"
name="circle-information-small"
role="img"
>
</sbb-icon>
<span class="sbb-notification__content">
<sbb-title
aria-level="3"
class="sbb-notification__title"
level="3"
role="heading"
visual-level="5"
>
<slot name="title">
Title
</slot>
</sbb-title>
<slot>
</slot>
</span>
<span class="sbb-notification__close-wrapper">
<sbb-divider
aria-orientation="vertical"
class="sbb-notification__divider"
orientation="vertical"
role="separator"
>
</sbb-divider>
<sbb-secondary-button
aria-label="Close message"
class="sbb-notification__close"
data-action=""
data-button=""
data-sbb-button=""
dir="ltr"
icon-name="cross-small"
role="button"
size="m"
tabindex="0"
>
</sbb-secondary-button>
</span>
</div>
</div>
`;
/* end snapshot sbb-notification renders with a title ShadowDom */

snapshots["sbb-notification renders with a slotted title Dom"] =
`<sbb-notification
data-slot-names="title unnamed"
data-state="opened"
disable-animation=""
size="m"
style="--sbb-notification-height: auto;"
type="info"
>
<span slot="title">
Slotted title
</span>
The quick brown fox jumps over the lazy dog.
</sbb-notification>
`;
/* end snapshot sbb-notification renders with a slotted title Dom */

snapshots["sbb-notification renders with a slotted title ShadowDom"] =
`<div class="sbb-notification__wrapper">
<div class="sbb-notification">
<sbb-icon
aria-hidden="true"
class="sbb-notification__icon"
data-namespace="default"
name="circle-information-small"
role="img"
>
</sbb-icon>
<span class="sbb-notification__content">
<sbb-title
aria-level="3"
class="sbb-notification__title"
level="3"
role="heading"
visual-level="5"
>
<slot name="title">
</slot>
</sbb-title>
<slot>
</slot>
</span>
<span class="sbb-notification__close-wrapper">
<sbb-divider
aria-orientation="vertical"
class="sbb-notification__divider"
orientation="vertical"
role="separator"
>
</sbb-divider>
<sbb-secondary-button
aria-label="Close message"
class="sbb-notification__close"
data-action=""
data-button=""
data-sbb-button=""
dir="ltr"
icon-name="cross-small"
role="button"
size="m"
tabindex="0"
>
</sbb-secondary-button>
</span>
</div>
</div>
`;
/* end snapshot sbb-notification renders with a slotted title ShadowDom */

snapshots["sbb-notification renders without the close button Dom"] =
`<sbb-notification
data-slot-names="unnamed"
data-state="opened"
disable-animation=""
readonly=""
size="m"
style="--sbb-notification-height: auto;"
title-content="Title"
type="info"
>
The quick brown fox jumps over the lazy dog.
</sbb-notification>
`;
/* end snapshot sbb-notification renders without the close button Dom */

snapshots["sbb-notification renders without the close button ShadowDom"] =
`<div class="sbb-notification__wrapper">
<div class="sbb-notification">
<sbb-icon
aria-hidden="true"
class="sbb-notification__icon"
data-namespace="default"
name="circle-information-small"
role="img"
>
</sbb-icon>
<span class="sbb-notification__content">
<sbb-title
aria-level="3"
class="sbb-notification__title"
level="3"
role="heading"
visual-level="5"
>
<slot name="title">
Title
</slot>
</sbb-title>
<slot>
</slot>
</span>
</div>
</div>
`;
/* end snapshot sbb-notification renders without the close button ShadowDom */

snapshots["sbb-notification renders size s Dom"] =
`<sbb-notification
data-slot-names="unnamed"
data-state="opened"
disable-animation=""
size="s"
style="--sbb-notification-height: auto;"
title-content="Title"
type="info"
>
The quick brown fox jumps over the lazy dog.
</sbb-notification>
`;
/* end snapshot sbb-notification renders size s Dom */

snapshots["sbb-notification renders size s ShadowDom"] =
`<div class="sbb-notification__wrapper">
<div class="sbb-notification">
<sbb-icon
aria-hidden="true"
class="sbb-notification__icon"
data-namespace="default"
name="circle-information-small"
role="img"
>
</sbb-icon>
<span class="sbb-notification__content">
<sbb-title
aria-level="3"
class="sbb-notification__title"
level="3"
role="heading"
visual-level="6"
>
<slot name="title">
Title
</slot>
</sbb-title>
<slot>
</slot>
</span>
<span class="sbb-notification__close-wrapper">
<sbb-divider
aria-orientation="vertical"
class="sbb-notification__divider"
orientation="vertical"
role="separator"
>
</sbb-divider>
<sbb-secondary-button
aria-label="Close message"
class="sbb-notification__close"
data-action=""
data-button=""
data-sbb-button=""
dir="ltr"
icon-name="cross-small"
role="button"
size="s"
tabindex="0"
>
</sbb-secondary-button>
</span>
</div>
</div>
`;
/* end snapshot sbb-notification renders size s ShadowDom */

Loading
Loading