feat(tooltip-definition): export open prop, dispatch open/close events (#1057)

This commit is contained in:
metonym 2022-02-09 20:00:38 -08:00 committed by GitHub
commit 20e61724c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 55 additions and 16 deletions

View file

@ -9,6 +9,12 @@ export interface TooltipDefinitionProps
*/
tooltipText?: string;
/**
* Set to `true` to open the tooltip
* @default false
*/
open?: boolean;
/**
* Set the alignment of the tooltip relative to the icon
* @default "center"
@ -37,6 +43,8 @@ export interface TooltipDefinitionProps
export default class TooltipDefinition extends SvelteComponentTyped<
TooltipDefinitionProps,
{
open: CustomEvent<any>;
close: CustomEvent<any>;
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];