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