mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
test: add TS types
This commit is contained in:
parent
302e82d6a2
commit
eed617433b
126 changed files with 3378 additions and 226 deletions
62
tests/Button.test.svelte
Normal file
62
tests/Button.test.svelte
Normal file
|
@ -0,0 +1,62 @@
|
|||
<script lang="ts">
|
||||
import { Button } from "../types";
|
||||
import Add16 from "carbon-icons-svelte/lib/Add16";
|
||||
</script>
|
||||
|
||||
<Button>Primary button</Button>
|
||||
|
||||
<Button kind="secondary">Secondary button</Button>
|
||||
|
||||
<Button kind="tertiary">Tertiary button</Button>
|
||||
|
||||
<Button kind="ghost">Ghost button</Button>
|
||||
|
||||
<Button kind="danger">Danger button</Button>
|
||||
|
||||
<Button kind="danger-tertiary">Danger tertiary button</Button>
|
||||
|
||||
<Button kind="danger-ghost">Danger ghost button</Button>
|
||||
|
||||
<Button icon="{Add16}">With icon</Button>
|
||||
|
||||
<Button
|
||||
icon="{Add16}"
|
||||
hasIconOnly
|
||||
tooltipPosition="bottom"
|
||||
tooltipAlignment="center"
|
||||
iconDescription="Tooltip text"
|
||||
/>
|
||||
|
||||
<Button href="#">Link button</Button>
|
||||
|
||||
<Button as let:props>
|
||||
<p {...props}>Custom element</p>
|
||||
</Button>
|
||||
|
||||
<Button size="field">Primary</Button>
|
||||
|
||||
<Button size="field" kind="secondary">Secondary</Button>
|
||||
|
||||
<Button size="field" kind="tertiary">Tertiary</Button>
|
||||
|
||||
<Button size="field" kind="ghost">Ghost</Button>
|
||||
|
||||
<Button size="field" kind="danger">Danger</Button>
|
||||
|
||||
<Button size="small">Primary</Button>
|
||||
|
||||
<Button size="small" kind="secondary">Secondary</Button>
|
||||
|
||||
<Button size="small" kind="tertiary">Tertiary</Button>
|
||||
|
||||
<Button size="small" kind="ghost">Ghost</Button>
|
||||
|
||||
<Button size="small" kind="danger">Danger</Button>
|
||||
|
||||
<Button disabled>Disabled button</Button>
|
||||
|
||||
<Button skeleton />
|
||||
|
||||
<Button skeleton size="field" />
|
||||
|
||||
<Button skeleton size="small" />
|
Loading…
Add table
Add a link
Reference in a new issue