parent
79fa6ea527
commit
ca3eadc8e3
|
@ -31,7 +31,6 @@ export interface InplaceProps {
|
||||||
disabled?: boolean | undefined;
|
disabled?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Icon to display in the close button.
|
* Icon to display in the close button.
|
||||||
* @defaultValue pi pi-times
|
|
||||||
*/
|
*/
|
||||||
closeIcon?: string | undefined;
|
closeIcon?: string | undefined;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="p-inplace-content">
|
<div v-else class="p-inplace-content">
|
||||||
<slot name="content"></slot>
|
<slot name="content"></slot>
|
||||||
<IPButton v-if="closable" :icon="closeIcon" :aria-label="closeAriaLabel" @click="close" v-bind="closeButtonProps" />
|
<IPButton v-if="closable" :aria-label="closeAriaLabel" @click="close" v-bind="closeButtonProps">
|
||||||
|
<template #icon>
|
||||||
|
<slot name="closeicon">
|
||||||
|
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="closeIcon"></component>
|
||||||
|
</slot>
|
||||||
|
</template>
|
||||||
|
</IPButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -13,7 +19,7 @@
|
||||||
<script>
|
<script>
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import FocusTrap from 'primevue/focustrap';
|
import FocusTrap from 'primevue/focustrap';
|
||||||
|
import TimesIcon from 'primevue/icon/times';
|
||||||
export default {
|
export default {
|
||||||
name: 'Inplace',
|
name: 'Inplace',
|
||||||
emits: ['open', 'close', 'update:active'],
|
emits: ['open', 'close', 'update:active'],
|
||||||
|
@ -32,7 +38,7 @@ export default {
|
||||||
},
|
},
|
||||||
closeIcon: {
|
closeIcon: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'pi pi-times'
|
default: undefined
|
||||||
},
|
},
|
||||||
displayProps: {
|
displayProps: {
|
||||||
type: null,
|
type: null,
|
||||||
|
@ -84,7 +90,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
IPButton: Button
|
IPButton: Button,
|
||||||
|
TimesIcon
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
focustrap: FocusTrap
|
focustrap: FocusTrap
|
||||||
|
|
Loading…
Reference in New Issue