From 0561d084fba546d2c469011268394905ef14e6ee Mon Sep 17 00:00:00 2001 From: Marco D'Auria Date: Mon, 18 Mar 2024 10:10:55 +0100 Subject: [PATCH] fix: validate event details type --- src/components/stepper/step/readme.md | 6 +++--- src/components/stepper/step/step.ts | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/stepper/step/readme.md b/src/components/stepper/step/readme.md index 2df5dfcfb56..b9a472e9407 100644 --- a/src/components/stepper/step/readme.md +++ b/src/components/stepper/step/readme.md @@ -32,9 +32,9 @@ The aria attribute `aria-labelledby` is set automatically. ## Events -| Name | Type | Description | Inherited From | -| ---------- | ------------------- | --------------------------------------------------------- | -------------- | -| `validate` | `CustomEvent` | Emits whenever step switch is triggered. Can be canceled. | | +| Name | Type | Description | Inherited From | +| ---------- | ----------------------------------- | --------------------------------------------------------- | -------------- | +| `validate` | `CustomEvent` | Emits whenever step switch is triggered. Can be canceled. | | ## Slots diff --git a/src/components/stepper/step/step.ts b/src/components/stepper/step/step.ts index ddff070f2e5..9e051efec1e 100644 --- a/src/components/stepper/step/step.ts +++ b/src/components/stepper/step/step.ts @@ -23,7 +23,7 @@ type ValidateEventDetails = { * Combined with a `sbb-stepper`, it displays a step's content. * * @slot - Use the unnamed slot to provide a content. - * @event {CustomEvent} validate - Emits whenever step switch is triggered. Can be canceled. + * @event {CustomEvent} validate - Emits whenever step switch is triggered. Can be canceled. */ @customElement('sbb-step') @hostAttributes({ @@ -39,7 +39,10 @@ export class SbbStepElement extends LitElement { /** * Emits whenever step switch is triggered. */ - private _validate: EventEmitter = new EventEmitter(this, SbbStepElement.events.validate); + private _validate: EventEmitter = new EventEmitter( + this, + SbbStepElement.events.validate, + ); private _abort = new ConnectedAbortController(this); private _stepper: SbbStepperElement | null = null;