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