Fixed #1146 - Allow Adding Classes to Dialog Content

pull/1088/head
Cagatay Civici 2021-04-14 16:27:16 +03:00
parent 6bd39b173d
commit 32389aea17
3 changed files with 13 additions and 2 deletions

View File

@ -5,7 +5,8 @@ interface DialogProps {
footer?: any;
visible?: boolean;
modal?: boolean;
contentStyle?: string;
contentStyle?: any;
contentClass?: string;
rtl?: boolean;
closable?: boolean;
dismissableMask?: boolean;

View File

@ -16,7 +16,7 @@
</button>
</div>
</div>
<div class="p-dialog-content" :style="contentStyle">
<div :class="contentStyleClass" :style="contentStyle">
<slot></slot>
</div>
<div class="p-dialog-footer" v-if="footer || $slots.footer">
@ -41,6 +41,7 @@ export default {
visible: Boolean,
modal: Boolean,
contentStyle: null,
contentClass: String,
rtl: Boolean,
maximizable: Boolean,
dismissableMask: Boolean,
@ -288,6 +289,9 @@ export default {
},
attributeSelector() {
return UniqueComponentId();
},
contentStyleClass() {
return ['p-dialog-content', this.contentClass];
}
},
directives: {

View File

@ -144,6 +144,12 @@ export default {
<td>null</td>
<td>Style of the content section.</td>
</tr>
<tr>
<td>contentClass</td>
<td>string</td>
<td>null</td>
<td>Style class of the content section.</td>
</tr>
<tr>
<td>rtl</td>
<td>boolean</td>