Skip to content

Commit

Permalink
fix: validate event details type
Browse files Browse the repository at this point in the history
  • Loading branch information
dauriamarco committed Mar 18, 2024
1 parent 1d844ca commit 0561d08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/stepper/step/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ The aria attribute `aria-labelledby` is set automatically.

## Events

| Name | Type | Description | Inherited From |
| ---------- | ------------------- | --------------------------------------------------------- | -------------- |
| `validate` | `CustomEvent<void>` | Emits whenever step switch is triggered. Can be canceled. | |
| Name | Type | Description | Inherited From |
| ---------- | ----------------------------------- | --------------------------------------------------------- | -------------- |
| `validate` | `CustomEvent<ValidateEventDetails>` | Emits whenever step switch is triggered. Can be canceled. | |

## Slots

Expand Down
7 changes: 5 additions & 2 deletions src/components/stepper/step/step.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>} validate - Emits whenever step switch is triggered. Can be canceled.
* @event {CustomEvent<ValidateEventDetails>} validate - Emits whenever step switch is triggered. Can be canceled.
*/
@customElement('sbb-step')
@hostAttributes({
Expand All @@ -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<ValidateEventDetails> = new EventEmitter(
this,
SbbStepElement.events.validate,
);

private _abort = new ConnectedAbortController(this);
private _stepper: SbbStepperElement | null = null;
Expand Down

0 comments on commit 0561d08

Please sign in to comment.