feat(Toggle): add loading prop (#1546)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Mohammad Amin Mokhtari
2024-03-25 15:13:15 +03:30
committed by GitHub
parent 224ec3c1fb
commit e1e05af0ba
3 changed files with 48 additions and 6 deletions

View File

@@ -52,6 +52,19 @@ excludedProps:
---
::
### Loading :u-badge{label="New" class="align-middle ml-2 !rounded-full" variant="subtle"}
Use the `loading` prop to show a loading icon and disable the Toggle.
Use the `loading-icon` prop to set a different icon or change it globally in `ui.toggle.default.loadingIcon`. Defaults to `i-heroicons-arrow-path-20-solid`.
::component-card
---
props:
loading: true
---
::
### Disabled
Use the `disabled` prop to disable the Toggle.