UNPKG

@ownclouders/design-system

Version:

ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components

46 lines (45 loc) 2.02 kB
/** * OcNotificationMessage Component * * This component is used to display notification messages to users. Notifications can have different statuses * (e.g., passive, primary, success, warning, danger) and can include a title, message, and optional error log content. * The component also supports an auto-dismiss feature based on a timeout. * * @component * @name OcNotificationMessage * @status ready * @release 1.0.0 * * @props {string} [status='passive'] - The status of the notification. Defines the color and icon variation. * Possible values: 'passive', 'primary', 'success', 'warning', 'danger'. * @props {string} title - The title of the notification. This is a required property. * @props {string} [message=null] - The message content of the notification. * @props {string} [errorLogContent=null] - The error log content to display when the "Details" button is clicked. * @props {number} [timeout=5] - The number of seconds the notification is displayed before auto-dismiss. * If set to 0, the notification will not auto-dismiss. * * @emits {void} close - Emitted when the user clicks the close button or when the notification auto-dismisses. * * @example * <OcNotificationMessage * status="success" * title="Operation Successful" * message="Your changes have been saved." * :timeout="10" * @close="handleClose" * /> * */ interface Props { status?: 'passive' | 'primary' | 'success' | 'warning' | 'danger'; title: string; message?: string; errorLogContent?: string; timeout?: number; } declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & { close: () => any; }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{ onClose?: () => any; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>; export default _default;