mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
add example usage to Checkbox docs
This commit is contained in:
parent
088524da82
commit
eb8ca16a14
1 changed files with 30 additions and 0 deletions
|
@ -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" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue