docs(checkbox): update

This commit is contained in:
Benjamin Canac
2024-07-26 14:59:56 +02:00
parent 09f76e75a9
commit 3a1ba1dfa3

View File

@@ -20,35 +20,44 @@ external:
ignore: ignore:
- label - label
props: props:
label: Check me
modelValue: true modelValue: true
label: Check me
--- ---
:: ::
Use the `default-value` prop to set the initial value of the Checkbox when you do not need to control its state. Use the `default-value` prop to set the initial value when you do not need to control its state.
::component-code ::component-code
--- ---
ignore: ignore:
- label - label
props: props:
label: Check me
defaultValue: true defaultValue: true
label: Check me
--- ---
:: ::
### Indeterminate
Use the `indeterminate` prop to set the Checkbox to an [indeterminate state](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes). Use the `indeterminate` prop to set the Checkbox to an [indeterminate state](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes).
Use the `indeterminate-icon` prop to customize this icon. Defaults to `i-heroicons-minus-20-solid`.
::component-code ::component-code
--- ---
ignore: ignore:
- label - label
props: props:
label: Check me
indeterminate: true indeterminate: true
indeterminateIcon: ''
label: Check me
--- ---
:: ::
::tip
You can customize this icon globally in your `app.config.ts` under `ui.icons.minus` key.
::
### Label ### Label
Use the `label` prop to set the label of the Checkbox. Use the `label` prop to set the label of the Checkbox.
@@ -84,9 +93,9 @@ ignore:
- label - label
- defaultValue - defaultValue
props: props:
label: Check me
icon: 'i-heroicons-heart' icon: 'i-heroicons-heart'
defaultValue: true defaultValue: true
label: Check me
--- ---
:: ::
@@ -104,9 +113,9 @@ ignore:
- label - label
- defaultValue - defaultValue
props: props:
label: Check me
color: gray color: gray
defaultValue: true defaultValue: true
label: Check me
--- ---
:: ::
@@ -120,21 +129,37 @@ ignore:
- label - label
- defaultValue - defaultValue
props: props:
label: Check me
size: xl size: xl
defaultValue: true defaultValue: true
label: Check me
--- ---
:: ::
### Disabled ### Required
Use the `required` prop to make the Checkbox required.
::component-code ::component-code
--- ---
ignore: ignore:
- label - label
props: props:
required: true
label: Check me label: Check me
---
::
### Disabled
Use the `disabled` prop to disable the Checkbox.
::component-code
---
ignore:
- label
props:
disabled: true disabled: true
label: Check me
--- ---
:: ::