Skip to content

Commit

Permalink
docs: checkbox and switch (#1496)
Browse files Browse the repository at this point in the history
* docs: fix checked for api of checkbox and switch

* docs: fix avatar key in vue-sfc
  • Loading branch information
dangvanthanh authored May 16, 2024
1 parent 9c2fca5 commit c44b0e9
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion website/data/snippets/react/checkbox/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Checkbox() {
return (
<label {...api.rootProps}>
<span {...api.labelProps}>
Input is {api.isChecked ? "checked" : "unchecked"}
Input is {api.checked ? "checked" : "unchecked"}
</span>
<div {...api.controlProps} />
<input {...api.hiddenInputProps} />
Expand Down
2 changes: 1 addition & 1 deletion website/data/snippets/react/switch/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Checkbox() {
<span {...api.controlProps}>
<span {...api.thumbProps} />
</span>
<span {...api.labelProps}>{api.isChecked ? "On" : "Off"}</span>
<span {...api.labelProps}>{api.checked ? "On" : "Off"}</span>
</label>
)
}
Expand Down
2 changes: 1 addition & 1 deletion website/data/snippets/solid/switch/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function Checkbox() {
<span {...api().controlProps}>
<span {...api().thumbProps} />
</span>
<span {...api().labelProps}>{api.isChecked ? "On" : "Off"}</span>
<span {...api().labelProps}>{api.checked ? "On" : "Off"}</span>
</label>
)
}
Expand Down
2 changes: 1 addition & 1 deletion website/data/snippets/vue-jsx/checkbox/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineComponent({
return (
<label {...api.rootProps}>
<span {...api.labelProps}>
Input is {api.isChecked ? "checked" : "unchecked"}
Input is {api.checked ? "checked" : "unchecked"}
</span>
<div {...api.controlProps} />
<input {...api.hiddenInputProps} />
Expand Down
2 changes: 1 addition & 1 deletion website/data/snippets/vue-jsx/switch/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default defineComponent({
<span {...api.controlProps}>
<span {...api.thumbProps} />
</span>
<span {...api.labelProps}>{api.isChecked ? "On" : "Off"}</span>
<span {...api.labelProps}>{api.checked ? "On" : "Off"}</span>
</label>
)
}
Expand Down
2 changes: 1 addition & 1 deletion website/data/snippets/vue-sfc/avatar/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<template>
<div v-bind="api.rootProps">
<span v-bind="api.fallbackProps">PA</span>
<img alt="PA" src="{src}" v-bind="api.imageProps" />
<img alt="PA" :src="src" v-bind="api.imageProps" />
</div>
</template>
```
2 changes: 1 addition & 1 deletion website/data/snippets/vue-sfc/checkbox/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<label v-bind="api.rootProps">
<span v-bind="api.labelProps">
Input is
<span v-if="api.isChecked"> checked</span>
<span v-if="api.checked"> checked</span>
<span v-else> unchecked</span>
</span>
<div v-bind="api.controlProps" />
Expand Down
2 changes: 1 addition & 1 deletion website/data/snippets/vue-sfc/switch/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<span v-bind="api.thumbProps" />
</span>
<span v-bind="api.labelProps">
<span v-if="api.isChecked">On</span>
<span v-if="api.checked">On</span>
<span v-else>Off</span>
</span>
</label>
Expand Down

0 comments on commit c44b0e9

Please sign in to comment.