test(clickable-tile): add unit tests

This commit is contained in:
Eric Liu 2025-03-09 15:29:57 -07:00
commit 39cb29afba
3 changed files with 85 additions and 16 deletions

View file

@ -0,0 +1,32 @@
<script lang="ts">
import { ClickableTile } from "carbon-components-svelte";
</script>
<ClickableTile href="https://www.carbondesignsystem.com/">
Link only
</ClickableTile>
<ClickableTile
light
href="https://www.carbondesignsystem.com/"
title=""
target="_blank"
>
Link with light variant
</ClickableTile>
<ClickableTile
href="#"
data-testid="click-test"
on:click={() => {
console.log("clicked");
}}
>
Click me
</ClickableTile>
<ClickableTile href="#" clicked>Clicked</ClickableTile>
<ClickableTile href="#" disabled data-testid="disabled-test">
Disabled tile
</ClickableTile>