feat(tooltip-icon): add icon prop

This allows consumers to pass a Carbon icon as a prop instead of using the default slot.
This commit is contained in:
Eric Y Liu 2021-06-26 05:48:46 -07:00
commit 278d906509
5 changed files with 40 additions and 15 deletions

View file

@ -10,6 +10,11 @@ export interface TooltipIconProps
*/
tooltipText?: string;
/**
* Specify the icon from `carbon-icons-svelte` to render
*/
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
/**
* Set the alignment of the tooltip relative to the icon
* @default "center"