primevue-mirror/doc/sidebar/pt/PTDoc.vue

75 lines
2.6 KiB
Vue
Raw Normal View History

2023-04-28 08:56:09 +00:00
<template>
<DocSectionText v-bind="$attrs"> </DocSectionText>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" :pt="{ root: { class: 'w-25rem' } }">
<h2>Sidebar</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
visible: false,
code: {
2023-08-16 13:58:31 +00:00
basic: `<Sidebar v-model:visible="visible"
2023-04-28 08:56:09 +00:00
:pt="{
root: { class: 'w-25rem' }
}
>
<h2>Sidebar</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />`,
2023-08-16 13:58:31 +00:00
options: `<template>
2023-04-28 08:56:09 +00:00
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible"
:pt="{
root: { class: 'w-25rem' }
}
>
<h2>Sidebar</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
</div>
</template>
<script>
export default {
data() {
return {
visible: false
}
}
}
<\/script>`,
2023-08-16 13:58:31 +00:00
composition: `<template>
2023-04-28 08:56:09 +00:00
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible"
:pt="{
root: { class: 'w-25rem' }
}
>
<h2>Sidebar</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
</div>
</template>
<script setup>
import { ref } from "vue";
const visible = ref(false);
<\/script>`
}
};
}
};
</script>