primevue-mirror/apps/showcase/doc/imagecompare/ResponsiveDoc.vue

66 lines
2.0 KiB
Vue
Raw Normal View History

2024-10-03 17:09:21 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Apply responsive styles to the container element to optimize display per screen size.</p>
</DocSectionText>
<div class="card flex justify-center">
2024-10-03 17:57:43 +00:00
<ImageCompare class="sm:!w-96 shadow-lg rounded-2xl">
2024-10-03 17:09:21 +00:00
<template #left>
2024-10-16 14:49:27 +00:00
<img src="https://primefaces.org/cdn/primevue/images/compare/island1.jpg" />
2024-10-03 17:09:21 +00:00
</template>
<template #right>
2024-10-16 14:49:27 +00:00
<img src="https://primefaces.org/cdn/primevue/images/compare/island2.jpg" />
2024-10-03 17:09:21 +00:00
</template>
</ImageCompare>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
2024-10-03 17:57:43 +00:00
<ImageCompare class="sm:!w-96 shadow-lg rounded-2xl">
2024-10-03 17:09:21 +00:00
<template #left>
<img src="~/assets/images/island1.jpg" />
</template>
<template #right>
<img src="~/assets/images/island2.jpg" />
</template>
</ImageCompare>
`,
options: `
<template>
<div class="card flex justify-center">
2024-10-03 17:57:43 +00:00
<ImageCompare class="sm:!w-96 shadow-lg rounde-2xl">
2024-10-03 17:09:21 +00:00
<template #left>
2024-10-16 14:49:27 +00:00
<img src="https://primefaces.org/cdn/primevue/images/compare/island1.jpg" />
2024-10-03 17:09:21 +00:00
</template>
<template #right>
2024-10-16 14:49:27 +00:00
<img src="https://primefaces.org/cdn/primevue/images/compare/island2.jpg" />
2024-10-03 17:09:21 +00:00
</template>
</ImageCompare>
</div>
</template>
`,
composition: `
<template>
<div class="card flex justify-center">
2024-10-03 17:57:43 +00:00
<ImageCompare class="sm:!w-96 shadow-lg">
2024-10-03 17:09:21 +00:00
<template #left>
2024-10-16 14:49:27 +00:00
<img src="https://primefaces.org/cdn/primevue/images/compare/island1.jpg" />
2024-10-03 17:09:21 +00:00
</template>
<template #right>
2024-10-16 14:49:27 +00:00
<img src="https://primefaces.org/cdn/primevue/images/compare/island2.jpg" />
2024-10-03 17:09:21 +00:00
</template>
</ImageCompare>
</div>
</template>
`
}
};
}
};
</script>