mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 19:01:05 +00:00
test: add TS types
This commit is contained in:
parent
302e82d6a2
commit
eed617433b
126 changed files with 3378 additions and 226 deletions
55
tests/ContentSwitcher.test.svelte
Normal file
55
tests/ContentSwitcher.test.svelte
Normal file
|
@ -0,0 +1,55 @@
|
|||
<script lang="ts">
|
||||
import { ContentSwitcher, Switch } from "../types";
|
||||
import Bullhorn16 from "carbon-icons-svelte/lib/Bullhorn16";
|
||||
import Analytics16 from "carbon-icons-svelte/lib/Analytics16";
|
||||
</script>
|
||||
|
||||
<ContentSwitcher>
|
||||
<Switch text="Latest news" />
|
||||
<Switch text="Trending" />
|
||||
</ContentSwitcher>
|
||||
|
||||
<ContentSwitcher selectedIndex="{1}">
|
||||
<Switch text="Latest news" />
|
||||
<Switch text="Trending" />
|
||||
<Switch text="Recommended" />
|
||||
</ContentSwitcher>
|
||||
|
||||
<ContentSwitcher light>
|
||||
<Switch text="Latest news" />
|
||||
<Switch text="Trending" />
|
||||
</ContentSwitcher>
|
||||
|
||||
<ContentSwitcher>
|
||||
<Switch>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<Bullhorn16 style="margin-right: 0.5rem;" />
|
||||
Latest news
|
||||
</div>
|
||||
</Switch>
|
||||
<Switch>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<Analytics16 style="margin-right: 0.5rem;" />
|
||||
Trending
|
||||
</div>
|
||||
</Switch>
|
||||
</ContentSwitcher>
|
||||
|
||||
<Bullhorn16 style="margin-right: 0.5rem;" />
|
||||
|
||||
<Analytics16 style="margin-right: 0.5rem;" />
|
||||
|
||||
<ContentSwitcher size="xl">
|
||||
<Switch text="All" />
|
||||
<Switch text="Archived" />
|
||||
</ContentSwitcher>
|
||||
|
||||
<ContentSwitcher size="sm">
|
||||
<Switch text="All" />
|
||||
<Switch text="Archived" />
|
||||
</ContentSwitcher>
|
||||
|
||||
<ContentSwitcher>
|
||||
<Switch disabled text="All" />
|
||||
<Switch disabled text="Archived" />
|
||||
</ContentSwitcher>
|
Loading…
Add table
Add a link
Reference in a new issue