mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
28 lines
632 B
Svelte
28 lines
632 B
Svelte
<script lang="ts">
|
|
import { TooltipIcon } from "carbon-components-svelte";
|
|
import Carbon from "carbon-icons-svelte/lib/Carbon.svelte";
|
|
|
|
export let tooltipText = "Test tooltip text";
|
|
export let disabled = false;
|
|
export let align: "start" | "center" | "end" = "center";
|
|
export let direction: "top" | "right" | "bottom" | "left" = "bottom";
|
|
export let id = "test-tooltip";
|
|
export let icon = Carbon;
|
|
</script>
|
|
|
|
<TooltipIcon
|
|
{tooltipText}
|
|
{disabled}
|
|
{align}
|
|
{direction}
|
|
{id}
|
|
{icon}
|
|
on:click
|
|
on:mouseover
|
|
on:mouseenter
|
|
on:mouseleave
|
|
on:focus
|
|
>
|
|
<slot name="tooltipText" />
|
|
<slot />
|
|
</TooltipIcon>
|