ToggleButton pt demo updated

pull/3938/head
Bahadır Sofuoğlu 2023-05-08 16:01:44 +03:00
parent c7b96b1bd2
commit bf9d7c0380
1 changed files with 36 additions and 4 deletions

View File

@ -1,7 +1,15 @@
<template>
<DocSectionText v-bind="$attrs"> </DocSectionText>
<div class="card flex justify-content-center">
<ToggleButton v-model="checked" class="w-8rem" />
<ToggleButton
v-model="checked"
class="w-8rem"
:pt="{
root: () => ({
class: checked ? 'bg-green-500 border-white' : undefined
})
}"
/>
</div>
<DocSectionCode :code="code" />
</template>
@ -13,11 +21,27 @@ export default {
checked: false,
code: {
basic: `
<ToggleButton v-model="checked" />`,
<ToggleButton
v-model="checked"
class="w-8rem"
:pt="{
root: () => ({
class: checked ? 'bg-green-500 border-white' : undefined
})
}"
/>`,
options: `
<template>
<div class="card flex justify-content-center">
<ToggleButton v-model="checked" class="w-8rem" />
<ToggleButton
v-model="checked"
class="w-8rem"
:pt="{
root: () => ({
class: checked ? 'bg-green-500 border-white' : undefined
})
}"
/>
</div>
</template>
@ -33,7 +57,15 @@ export default {
composition: `
<template>
<div class="card flex justify-content-center">
<ToggleButton v-model="checked" class="w-8rem" />
<ToggleButton
v-model="checked"
class="w-8rem"
:pt="{
root: () => ({
class: checked ? 'bg-green-500 border-white' : undefined
})
}"
/>
</div>
</template>