diff --git a/api-generator/components/message.js b/api-generator/components/message.js index dc74ba0e6..652050e87 100644 --- a/api-generator/components/message.js +++ b/api-generator/components/message.js @@ -31,6 +31,17 @@ const MessageProps = [ } ]; +const MessageSlots = [ + { + name: 'messageicon', + description: 'Custom message icon template.' + }, + { + name: 'closeicon', + description: 'Custom close icon template.' + } +]; + const MessageEvents = [ { name: 'close', @@ -50,6 +61,7 @@ module.exports = { name: 'Message', description: 'Messages is used to display inline messages with various severities.', props: MessageProps, + slots: MessageSlots, events: MessageEvents } }; diff --git a/components/lib/message/Message.d.ts b/components/lib/message/Message.d.ts index 74fd3d089..cf4febf11 100755 --- a/components/lib/message/Message.d.ts +++ b/components/lib/message/Message.d.ts @@ -40,7 +40,6 @@ export interface MessageProps { icon?: string | undefined; /** * Icon to display in the message close button. - * @defaultValue pi pi-times */ closeIcon?: string | undefined; /** @@ -57,6 +56,14 @@ export interface MessageSlots { * Default custom slot. */ default(): VNode[]; + /** + * Custom message icon template. + */ + messageicon(): VNode[]; + /** + * Custom close icon template. + */ + closeicon(): VNode[]; } /** diff --git a/components/lib/message/Message.vue b/components/lib/message/Message.vue index fe516be9f..f447df6e0 100755 --- a/components/lib/message/Message.vue +++ b/components/lib/message/Message.vue @@ -2,12 +2,16 @@
- + + +
@@ -16,6 +20,11 @@