primevue-mirror/apps/volt/doc/toggleswitch/BasicDoc.vue

32 lines
716 B
Vue
Raw Normal View History

2025-03-01 16:44:31 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>ToggleSwitch is used with the <i>v-model</i> property for two-way value binding.</p>
</DocSectionText>
<div class="card flex justify-center">
<ToggleSwitch v-model="checked" />
</div>
<DocSectionCode :code="code" />
</template>
<script setup>
2025-03-03 12:50:58 +00:00
import ToggleSwitch from '@/volt/toggleswitch';
2025-03-01 16:44:31 +00:00
import { ref } from 'vue';
const checked = ref(false);
const code = ref(`
<template>
<div class="card flex justify-center">
<ToggleSwitch v-model="checked" />
</div>
</template>
<script setup>
2025-03-03 12:50:58 +00:00
import ToggleSwitch from '@/volt/toggleswitch';
2025-03-01 16:44:31 +00:00
import { ref } from 'vue';
const checked = ref(false);
<\/script>
`);
</script>