add example usage to Checkbox docs

This commit is contained in:
Moritz Bischof 2021-05-04 19:24:27 +02:00
commit eb8ca16a14

View file

@ -1,8 +1,38 @@
<script>
import { Checkbox } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
import Playground from "../../components/playground/Playground.svelte";
</script>
<Playground
component={Checkbox}
props={{
labelText: {
component: "TextInput",
props: { value: "Label text", labelText: "Label" }
},
checked: {
component: "Checkbox",
props: { labelText: "Checked" }
},
indeterminate: {
component: "Checkbox",
props: { labelText: "Indeterminate" }
},
hideLabel: {
component: "Checkbox",
props: { labelText: "Hide label" }
},
disabled: {
component: "Checkbox",
props: { labelText: "Disabled" }
},
skeleton: {
component: "Checkbox",
props: { labelText: "Skeleton" }
},
}} />
### Default (unchecked)
<Checkbox labelText="Label text" />