Skip to content

Commit

Permalink
fix: integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
dauriamarco committed Jan 15, 2024
1 parent e80c86f commit 33491d2
Showing 1 changed file with 27 additions and 31 deletions.
58 changes: 27 additions & 31 deletions src/components/notification/notification.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ const simpleNotification = (
title-content="${title}"
disable-animation
style="--sbb-notification-margin: 0 0 var(--sbb-spacing-fixed-4x) 0;"
${ref(
(notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() => ((notification as SbbNotificationElement).disableAnimation = disabelAnimation),
{ once: true },
),
${ref((notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() => ((notification as SbbNotificationElement).disableAnimation = disabelAnimation),
{ once: true },
),
)}
>
This is a ${type} notification.
Expand All @@ -117,14 +116,13 @@ const DefaultTemplate = (args: Args): TemplateResult => html`
<sbb-notification
${sbbSpread({ ...args, ['disable-animation']: true })}
style="--sbb-notification-margin: 0 0 var(--sbb-spacing-fixed-4x) 0;"
${ref(
(notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
${ref((notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
)}
>
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
Expand All @@ -138,14 +136,13 @@ const MultipleNotificationsTemplate = (args: Args): TemplateResult => html`
<sbb-notification
${sbbSpread({ ...args, ['disable-animation']: true })}
style="--sbb-notification-margin: 0 0 var(--sbb-spacing-fixed-4x) 0;"
${ref(
(notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
${ref((notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
)}
>
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
Expand All @@ -163,14 +160,13 @@ const SlottedTitleTemplate = (args: Args): TemplateResult => html`
<sbb-notification
${sbbSpread({ ...args, ['disable-animation']: true })}
style="--sbb-notification-margin: 0 0 var(--sbb-spacing-fixed-4x) 0;"
${ref(
(notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
${ref((notification?: Element) =>
(notification as SbbNotificationElement)?.addEventListener(
SbbNotificationElement.events.didOpen,
() =>
((notification as SbbNotificationElement).disableAnimation = args['disable-animation']),
{ once: true },
),
)}
>
<span slot="title">Slotted title</span>
Expand Down

0 comments on commit 33491d2

Please sign in to comment.