@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
43 lines (42 loc) • 1.85 kB
TypeScript
import type { ReactElement, ReactNode } from 'react';
import type { CommonProps } from '../../types/index.js';
import type { ListPropTypes } from '../../webComponents/List/index.js';
import type { MessageItemPropTypes } from './MessageItem.js';
export interface MessageViewDomRef extends HTMLDivElement {
/**
* Navigates back to the list page
*/
navigateBack: () => void;
}
export interface MessageViewPropTypes extends CommonProps {
/**
* Defines whether the messages are grouped or not.
*/
groupItems?: boolean;
/**
* Defines whether the header of the details page will be shown.
*/
showDetailsPageHeader?: boolean;
/**
* A list with message items. If only one item is provided, the initial page will be the details page for the item.
*
* * __Note:__ Although this prop accepts all HTML Elements, it is strongly recommended that you only use `Message` in order to preserve the intended design.
*/
children: ReactNode | ReactNode[];
/**
* Event is fired when the details of a message are shown.
*/
onItemSelect?: ListPropTypes['onItemClick'];
}
export declare const resolveMessageTypes: (children: ReactElement<MessageItemPropTypes>[]) => {
Negative: number;
Critical: number;
Positive: number;
Information: number;
};
export declare const resolveMessageGroups: (children: ReactElement<MessageItemPropTypes>[]) => [string, ReactElement<MessageItemPropTypes, string | import("react").JSXElementConstructor<any>>[]][];
/**
* The `MessageView` is used to display a summarized list of different types of messages (error, warning, success, and information messages).
*/
declare const MessageView: import("react").ForwardRefExoticComponent<MessageViewPropTypes & import("react").RefAttributes<MessageViewDomRef>>;
export { MessageView };