-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web-core): added UiCheckbox component (#8064)
- Loading branch information
Showing
2 changed files
with
441 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
@xen-orchestra/lite/src/stories/web-core/ui/checkbox/ui-checkbox.story.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<template> | ||
<ComponentStory | ||
v-slot="{ properties, settings }" | ||
:params="[ | ||
prop('accent') | ||
.type('CheckboxAccent') | ||
.required() | ||
.enum('info', 'success', 'warning', 'danger') | ||
.preset('info') | ||
.widget(), | ||
prop('disabled').bool().widget(), | ||
slot(), | ||
slot('info'), | ||
setting('defaultSlot').widget(text()).preset('Label'), | ||
setting('info').widget(text()).preset('Lorem ipsum dolor sit amet, consectetur adipiscing elit.'), | ||
model().type('boolean').preset(undefined), | ||
]" | ||
> | ||
<UiCheckbox v-bind="properties"> | ||
{{ settings.defaultSlot }} | ||
<template v-if="settings.info" #info>{{ settings.info }}</template> | ||
</UiCheckbox> | ||
</ComponentStory> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import ComponentStory from '@/components/component-story/ComponentStory.vue' | ||
import { model, prop, setting, slot } from '@/libs/story/story-param' | ||
import { text } from '@/libs/story/story-widget' | ||
import UiCheckbox from '@core/components/ui/checkbox/UiCheckbox.vue' | ||
</script> |
Oops, something went wrong.