mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
docs: add new component docs
This commit is contained in:
parent
c2fb2d213d
commit
2008d0035f
130 changed files with 6662 additions and 3801 deletions
39
docs/src/pages/components/ContentSwitcher.svx
Normal file
39
docs/src/pages/components/ContentSwitcher.svx
Normal file
|
@ -0,0 +1,39 @@
|
|||
<script>
|
||||
import { ContentSwitcher, Switch } from "carbon-components-svelte";
|
||||
import Add16 from "carbon-icons-svelte/lib/Add16";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
### Default
|
||||
|
||||
<ContentSwitcher>
|
||||
<Switch text="Switch 1" />
|
||||
<Switch text="Switch 2" />
|
||||
<Switch text="Switch 3" />
|
||||
</ContentSwitcher>
|
||||
|
||||
### Light variant
|
||||
|
||||
<ContentSwitcher light>
|
||||
<Switch text="Switch 1" />
|
||||
<Switch text="Switch 2" />
|
||||
<Switch text="Switch 3" />
|
||||
</ContentSwitcher>
|
||||
|
||||
### Custom switch slot
|
||||
|
||||
<ContentSwitcher>
|
||||
<Switch>
|
||||
<div style="display: flex; align-items: center;">
|
||||
Third section <Add16 style="margin-left: .25rem;" />
|
||||
</div>
|
||||
</Switch>
|
||||
<Switch text="Switch 2" />
|
||||
</ContentSwitcher>
|
||||
|
||||
### Disabled
|
||||
|
||||
<ContentSwitcher>
|
||||
<Switch text="Switch 1" disabled />
|
||||
<Switch text="Switch 2" disabled />
|
||||
</ContentSwitcher>
|
Loading…
Add table
Add a link
Reference in a new issue