diff --git a/src/components/navigation/navigation-section/navigation-section.stories.ts b/src/components/navigation/navigation-section/navigation-section.stories.ts index 2d2fa216995..dd4f988fda5 100644 --- a/src/components/navigation/navigation-section/navigation-section.stories.ts +++ b/src/components/navigation/navigation-section/navigation-section.stories.ts @@ -20,8 +20,8 @@ import '../navigation'; const playStory = async (trigger: string, canvasElement: HTMLElement): Promise => { const canvas = within(canvasElement); - await waitForComponentsReady(() => - canvas.getByTestId('navigation').shadowRoot?.querySelector('.sbb-navigation'), + await waitForComponentsReady( + () => canvas.getByTestId('navigation').shadowRoot?.querySelector('.sbb-navigation'), ); const button = canvas.getByTestId('navigation-trigger'); diff --git a/src/components/navigation/navigation/navigation.stories.ts b/src/components/navigation/navigation/navigation.stories.ts index 1694577685d..e6ecd4a0333 100644 --- a/src/components/navigation/navigation/navigation.stories.ts +++ b/src/components/navigation/navigation/navigation.stories.ts @@ -29,8 +29,8 @@ import '../../button'; const playStory = async ({ canvasElement }: StoryContext): Promise => { const canvas = within(canvasElement); - await waitForComponentsReady(() => - canvas.getByTestId('navigation').shadowRoot?.querySelector('.sbb-navigation'), + await waitForComponentsReady( + () => canvas.getByTestId('navigation').shadowRoot?.querySelector('.sbb-navigation'), ); const button = canvas.getByTestId('navigation-trigger'); diff --git a/src/components/notification/notification.stories.ts b/src/components/notification/notification.stories.ts index e4d82459234..db84e88aa7b 100644 --- a/src/components/notification/notification.stories.ts +++ b/src/components/notification/notification.stories.ts @@ -91,12 +91,13 @@ 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. @@ -116,13 +117,14 @@ const DefaultTemplate = (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 @@ -136,13 +138,14 @@ 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 @@ -160,13 +163,14 @@ const SlottedTitleTemplate = (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 }, + ), )} > Slotted title diff --git a/src/components/timetable-row/timetable-row.ts b/src/components/timetable-row/timetable-row.ts index 6b2d3fca98d..4b26ecb823d 100644 --- a/src/components/timetable-row/timetable-row.ts +++ b/src/components/timetable-row/timetable-row.ts @@ -437,9 +437,8 @@ export class SbbTimetableRowElement extends LitElement { // add prefix "new" if quay was changed const changedQuayPrefix = departure?.quayChanged ? `${i18nNew[this._language.current]} ` : ''; - return `${changedQuayPrefix}${ - this._getQuayTypeStrings()?.long - } ${departure?.quayFormatted}, `; + return `${changedQuayPrefix}${this._getQuayTypeStrings() + ?.long} ${departure?.quayFormatted}, `; }; const meansOfTransportText =