From 4e409a45abb5981ac38f3a1b54a2dc7ae8669dc9 Mon Sep 17 00:00:00 2001 From: Marco D'Auria Date: Mon, 15 Jan 2024 11:35:11 +0100 Subject: [PATCH] fix: integrity --- .../notification/notification.stories.ts | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/components/notification/notification.stories.ts b/src/components/notification/notification.stories.ts index 3547e90bd0..b9c65db4ee 100644 --- a/src/components/notification/notification.stories.ts +++ b/src/components/notification/notification.stories.ts @@ -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. @@ -137,14 +136,13 @@ const MultipleNotificationsTemplate = (args: Args): TemplateResult => html` - (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