Skip to content

Commit

Permalink
feat(web-core): added UiCheckbox component (#8064)
Browse files Browse the repository at this point in the history
  • Loading branch information
J0ris-K authored Nov 12, 2024
1 parent 02f34c1 commit c7ddf33
Show file tree
Hide file tree
Showing 2 changed files with 441 additions and 0 deletions.
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>
Loading

0 comments on commit c7ddf33

Please sign in to comment.