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

99 lines
2.4 KiB
JavaScript
Raw Permalink Normal View History

const ToastProps = [
{
2022-09-14 14:26:41 +00:00
name: 'group',
type: 'string',
default: 'null',
description: 'Unique identifier of a message group.'
},
{
2022-09-14 14:26:41 +00:00
name: 'position',
type: 'string',
default: 'top-right',
description: 'Position of the toast in viewport. Other valid values are "top-left", "top-center", "bottom-left", "bottom-center", "bottom-right" and "center".'
},
{
2022-09-14 14:26:41 +00:00
name: 'autoZIndex',
type: 'boolean',
default: 'true',
description: 'Whether to automatically manage layering.'
},
{
2022-09-14 14:26:41 +00:00
name: 'baseZIndex',
type: 'number',
default: '0',
description: 'Base zIndex value to use in layering.'
},
{
2022-09-14 14:26:41 +00:00
name: 'breakpoints',
type: 'object',
default: 'null',
description: 'Object literal to define widths per screen size.'
2023-04-28 13:39:19 +00:00
},
{
name: 'pt',
type: 'any',
default: 'null',
2023-08-01 14:01:12 +00:00
description: 'Used to pass attributes to DOM elements inside the component.'
2023-07-06 13:20:37 +00:00
},
{
name: 'unstyled',
type: 'boolean',
default: 'false',
description: 'When enabled, it removes component related styles in the core.'
}
];
const ToastEvents = [
{
name: 'close',
description: 'Callback to invoke when the toast is closed.',
arguments: [
{
name: 'message',
type: 'any',
description: 'Message of toast.'
}
]
},
{
name: 'life-end',
description: 'Callback to invoke when the toast timeout is over.',
arguments: [
{
name: 'message',
type: 'any',
description: 'Message of toast.'
}
]
}
];
const ToastSlots = [
{
2022-09-14 14:26:41 +00:00
name: 'message',
description: 'Custom content for the toast message'
},
{
name: 'icon',
description: 'Custom icon template.'
},
{
name: 'closeicon',
description: 'Custom close icon template.'
},
{
name: 'container',
description: 'Custom container template.'
}
];
module.exports = {
toast: {
2022-09-14 14:26:41 +00:00
name: 'Toast',
description: 'Toast is used to display messages in an overlay.',
props: ToastProps,
events: ToastEvents,
slots: ToastSlots
}
};