primevue-mirror/api-generator/components/message.js

68 lines
1.6 KiB
JavaScript
Raw Normal View History

const MessageProps = [
{
2022-09-14 14:26:41 +00:00
name: 'severity',
type: 'string',
default: 'info',
description: 'Severity level of the message. Valid severities are "success", "info", "warn" and "error".'
},
{
2022-09-14 14:26:41 +00:00
name: 'closable',
type: 'boolean',
default: 'true',
description: 'Whether the message can be closed manually using the close icon.'
},
{
2022-09-14 14:26:41 +00:00
name: 'sticky',
type: 'boolean',
default: 'null',
description: 'When enabled, message is not removed automatically.'
},
{
2022-09-14 14:26:41 +00:00
name: 'life',
type: 'number',
default: '300',
description: 'Delay in milliseconds to close the message automatically.'
},
{
2022-09-14 14:26:41 +00:00
name: 'icon',
type: 'string',
default: 'null',
description: 'Display a custom icon for the message.'
}
];
const MessageSlots = [
{
name: 'messageicon',
description: 'Custom message icon template.'
},
{
name: 'closeicon',
description: 'Custom close icon template.'
}
];
const MessageEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'close',
description: 'Callback to invoke when a message is closed.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Browser event'
}
]
}
];
module.exports = {
message: {
2022-09-14 14:26:41 +00:00
name: 'Message',
description: 'Messages is used to display inline messages with various severities.',
props: MessageProps,
slots: MessageSlots,
events: MessageEvents
}
};