primevue-mirror/doc/drawer/SizeDoc.vue

69 lines
2.6 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
2024-05-25 13:52:39 +00:00
<p>Drawer dimension can be defined with <i>style</i> or <i>class</i> properties, this responsive example utilizes Tailwind.</p>
2023-02-28 08:29:30 +00:00
</DocSectionText>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-05-25 13:52:39 +00:00
<Drawer v-model:visible="visible" header="Drawer" class="!w-full md:!w-80 lg:!w-[30rem]">
2023-02-28 08:29:30 +00:00
<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>
2024-04-18 14:22:30 +00:00
</Drawer>
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-arrow-right" @click="visible = true" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
visible: false,
code: {
2023-09-22 12:54:14 +00:00
basic: `
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-05-25 13:52:39 +00:00
<Drawer v-model:visible="visible" header="Drawer" class="!w-full md:!w-80 lg:!w-[30rem]">
2023-02-28 08:29:30 +00:00
<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>
2024-04-18 14:22:30 +00:00
</Drawer>
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-arrow-right" @click="visible = true" />
2023-10-15 09:38:39 +00:00
</div>
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-05-25 13:52:39 +00:00
<Drawer v-model:visible="visible" header="Drawer" class="!w-full md:!w-80 lg:!w-[30rem]">
2023-02-28 08:29:30 +00:00
<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>
2024-04-18 14:22:30 +00:00
</Drawer>
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-arrow-right" @click="visible = true" />
</div>
</template>
<script>
export default {
data() {
return {
visible: false
}
}
}
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-05-25 13:52:39 +00:00
<Drawer v-model:visible="visible" header="Drawer" class="!w-full md:!w-80 lg:!w-[30rem]">
2023-02-28 08:29:30 +00:00
<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>
2024-04-18 14:22:30 +00:00
</Drawer>
2023-02-28 08:29:30 +00:00
<Button icon="pi pi-arrow-right" @click="visible = true" />
</div>
</template>
<script setup>
import { ref } from "vue";
const visible = ref(false);
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>