UNPKG

@progress/kendo-angular-notification

Version:

Kendo UI Notification for Angular

98 lines (97 loc) 3.28 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ export class NotificationSettings { /** * Defines the content of the Notification. */ content; /** * Specifies the time in milliseconds after which the * Notification will hide * ([see example](slug:hiding_notifications#toc-defining-a-delay-before-hiding)). * * @default 5000 */ hideAfter = 5000; /** * Defines the position of the Notification * ([see example]({% slug positioning_notification %})). * * The possible values are: * * `horizontal: 'left'|'center'|'right'` * * `vertical: 'top'|'bottom'` * * @default { horizontal: 'right', vertical: 'top' } */ position = { horizontal: 'right', vertical: 'top' }; /** * Specifies the animation settings of the Notification * ([see example]({% slug animations_notification %})). * * The possible values are: * * `duration`—Accepts a number in milliseconds. Defaults to `500ms`. * * `type?: 'slide'| (Default) 'fade'` * * @default { type: 'fade', duration: 500 } */ animation = { type: 'fade', duration: 500 }; /** * Specifies if the Notification will require a user action to hide. * If you set the property to `true`, the Notification renders a **Close** button * ([see example]({% slug hiding_notifications %}#toc-defining-a-closable-notification)). * * The possible values are: * * (Default) `false` * * `true` * * @default false */ closable = false; /** * Specifies the title of the close button. */ closeTitle; /** * Specifies the type of the Notification * ([see example]({% slug types_notification %})). * * The possible values are: * * `style: (Default) 'none'|'success'|'error'|'warning'|'info'` * * `icon: 'true'|'false'` * * @default { style: 'none', icon: true } */ type = { style: 'none', icon: true }; /** * Specifies the width of the Notification. */ width; /** * Specifies the height of the Notification. */ height; /** * The value of the Notification element `aria-label` attribute. * * @default 'Notification' */ notificationLabel = 'Notification'; /** * Specifies a list of CSS classes that you add to the Notification. * To apply CSS rules to the component, set `encapsulation` to `ViewEncapsulation.None` * ([see example](slug:overview_notification)). * * > To style the content of the Notification, use the `cssClass` property binding. */ cssClass; /** * Defines the container to which the Notification will be appended * ([see example]({% slug dynamic_containers %})). * * If not provided, the Notification will be placed in the root component * of the application or in the `body` element of the document. */ appendTo; }