Skip to content

Commit

Permalink
feat(tooltip): add open and close events
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyzerner committed Jan 10, 2024
1 parent 987d933 commit d2800e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ export default class TooltipElement extends HTMLElement {
tooltip.dataset.placement = placement;
})
);

this.dispatchEvent(new Event('open'));
}

public hide() {
Expand All @@ -143,6 +145,8 @@ export default class TooltipElement extends HTMLElement {
goodbye(this.tooltip!).then(() => {
if (this.tooltip) this.tooltip.hidden = true;
});

this.dispatchEvent(new Event('close'));
}
}

Expand Down

0 comments on commit d2800e7

Please sign in to comment.