mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
test(tooltip-icon): add unit tests
This commit is contained in:
parent
46728fe065
commit
ca5f836c1c
3 changed files with 148 additions and 33 deletions
28
tests/TooltipIcon/TooltipIcon.test.svelte
Normal file
28
tests/TooltipIcon/TooltipIcon.test.svelte
Normal file
|
@ -0,0 +1,28 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue