feat(tooltip-icon): make tooltipText slottable

This commit is contained in:
Eric Liu 2021-02-03 06:10:15 -08:00
commit 6b75607dce
6 changed files with 48 additions and 16 deletions

View file

@ -2,7 +2,8 @@
export interface TooltipIconProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> {
/**
* Specify the tooltip text
* Specify the tooltip text.
* Alternatively, use the "text" slot
* @default ""
*/
tooltipText?: string;
@ -36,6 +37,7 @@ export default class TooltipIcon {
$$prop_def: TooltipIconProps;
$$slot_def: {
default: {};
text: {};
};
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;