Image demo updates

pull/3919/head^2
Tuğçe Küçükoğlu 2023-05-03 20:56:09 +03:00
parent cbdf8e934a
commit d0dd241b02
2 changed files with 29 additions and 9 deletions

View File

@ -3,11 +3,7 @@
<p>Enabling <i>preview</i> mode displays a modal layer when the image is clicked to provide transformation options such as rotating and zooming.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria10.jpg" alt="Image" width="250" preview>
<template #imagePreview="slotProps">
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria10.jpg" alt="Image" :style="slotProps.imagePreviewStyle" @click="slotProps.previewImageClick" />
</template>
</Image>
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria10.jpg" alt="Image" width="250" preview />
</div>
<DocSectionCode :code="code" />

View File

@ -3,10 +3,16 @@
<p>An eye icon is displayed by default when the image is hovered in preview mode. Use the <i>indicator</i> slot for custom content.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="Image" width="250" preview>
<Image alt="Image" preview>
<template #indicatoricon>
<i class="pi pi-check"></i>
</template>
<template #image>
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria12s.jpg" alt="image" />
</template>
<template #preview="slotProps">
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="preview" :style="slotProps.style" @click="slotProps.onClick" />
</template>
</Image>
</div>
<DocSectionCode :code="code" />
@ -18,28 +24,46 @@ export default {
return {
code: {
basic: `
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="Image" width="250" preview>
<Image alt="Image" preview>
<template #indicatoricon>
<i class="pi pi-check"></i>
</template>
<template #image>
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria12s.jpg" alt="image" />
</template>
<template #preview="slotProps">
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="preview" :style="slotProps.style" @click="slotProps.onClick" />
</template>
</Image>`,
options: `
<template>
<div class="card flex justify-content-center">
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="Image" width="250" preview>
<Image alt="Image" preview>
<template #indicatoricon>
<i class="pi pi-check"></i>
</template>
<template #image>
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria12s.jpg" alt="image" />
</template>
<template #preview="slotProps">
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="preview" :style="slotProps.style" @click="slotProps.onClick" />
</template>
</Image>
</div>
</template>`,
composition: `
<template>
<div class="card flex justify-content-center">
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="Image" width="250" preview>
<Image alt="Image" preview>
<template #indicatoricon>
<i class="pi pi-check"></i>
</template>
<template #image>
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria12s.jpg" alt="image" />
</template>
<template #preview="slotProps">
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="preview" :style="slotProps.style" @click="slotProps.onClick" />
</template>
</Image>
</div>
</template>`