2023-05-06 19:56:50 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs"> </DocSectionText>
|
|
|
|
<div class="card flex justify-content-center">
|
|
|
|
<SelectButton
|
|
|
|
v-model="value"
|
|
|
|
:options="options"
|
|
|
|
aria-labelledby="basic"
|
|
|
|
:pt="{
|
2023-05-09 09:18:10 +00:00
|
|
|
button: ({ context }) => ({
|
|
|
|
class: context.active ? 'bg-cyan-400 border-cyan-400' : undefined
|
2023-05-08 12:32:33 +00:00
|
|
|
})
|
2023-05-06 19:56:50 +00:00
|
|
|
}"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: 'Off',
|
|
|
|
options: ['Off', 'On'],
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
<SelectButton
|
2023-05-08 12:32:33 +00:00
|
|
|
v-model="value"
|
|
|
|
:options="options"
|
|
|
|
aria-labelledby="basic"
|
|
|
|
:pt="{
|
2023-05-09 09:18:10 +00:00
|
|
|
button: ({ context }) => ({
|
|
|
|
class: context.active ? 'bg-cyan-400 border-cyan-400' : undefined
|
2023-05-08 12:32:33 +00:00
|
|
|
})
|
2023-05-09 09:18:10 +00:00
|
|
|
}"
|
|
|
|
/>`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2023-05-06 19:56:50 +00:00
|
|
|
<div class="card flex justify-content-center">
|
2023-05-08 12:32:33 +00:00
|
|
|
<SelectButton
|
|
|
|
v-model="value"
|
|
|
|
:options="options"
|
|
|
|
aria-labelledby="basic"
|
|
|
|
:pt="{
|
2023-05-09 09:18:10 +00:00
|
|
|
button: ({ context }) => ({
|
|
|
|
class: context.active ? 'bg-cyan-400 border-cyan-400' : undefined
|
2023-05-08 12:32:33 +00:00
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
2023-05-06 19:56:50 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: 'off',
|
|
|
|
options: ['Off', 'On']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
<\/script>`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2023-05-06 19:56:50 +00:00
|
|
|
<div class="card flex justify-content-center">
|
2023-05-08 12:32:33 +00:00
|
|
|
<SelectButton
|
|
|
|
v-model="value"
|
|
|
|
:options="options"
|
|
|
|
aria-labelledby="basic"
|
|
|
|
:pt="{
|
2023-05-09 09:18:10 +00:00
|
|
|
button: ({ context }) => ({
|
|
|
|
class: context.active ? 'bg-cyan-400 border-cyan-400' : undefined
|
2023-05-08 12:32:33 +00:00
|
|
|
})
|
|
|
|
}"
|
|
|
|
/>
|
2023-05-06 19:56:50 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
const value = ref('off');
|
|
|
|
const options = ref(['Off', 'On']);
|
|
|
|
<\/script>`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|