feat(theme): add Theme (#741)

* feat(theme): add Theme

* fix(theme): fix broken type test

* docs(theme): add examples

* docs(theme): add description, update carbon theme link [ci skip]

* docs: pre-wrap type code snippet [ci skip]
This commit is contained in:
Eric Liu 2021-07-10 16:00:03 -07:00 committed by GitHub
commit fac78ee4aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 475 additions and 4 deletions

View file

@ -0,0 +1,17 @@
<script>
import {
Theme,
RadioButtonGroup,
RadioButton,
} from "carbon-components-svelte";
let theme = "g90";
</script>
<Theme bind:theme persist persistKey="__carbon-theme" />
<RadioButtonGroup legendText="Carbon theme" bind:selected="{theme}">
{#each ["white", "g10", "g80", "g90", "g100"] as value}
<RadioButton labelText="{value}" value="{value}" />
{/each}
</RadioButtonGroup>