Indicator icon props added

pull/3780/head
Furkan Sezis 2023-03-21 16:59:02 +03:00
parent 18fcf71928
commit 00ec5d1264
2 changed files with 10 additions and 1 deletions

View File

@ -27,6 +27,11 @@ export interface ImageProps {
* Style class of the image element.
*/
imageClass?: any;
/**
* Custom indicator icon.
* @defaultValue pi pi-eye
*/
indicatorIcon?: string;
}
/**

View File

@ -3,7 +3,7 @@
<img v-bind="$attrs" :style="imageStyle" :class="imageClass" @error="onError" />
<button v-if="preview" ref="previewButton" class="p-image-preview-indicator" @click="onImageClick" v-bind="previewButtonProps">
<slot name="indicator">
<i class="p-image-preview-icon pi pi-eye"></i>
<i :class="['p-image-preview-icon', indicatorIcon]"></i>
</slot>
</button>
<Portal>
@ -68,6 +68,10 @@ export default {
previewButtonProps: {
type: null,
default: null
},
indicatorIcon: {
type: String,
default: 'pi pi-eye'
}
},
mask: null,