UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

43 lines (42 loc) 1.89 kB
'use client'; import '@ui5/webcomponents-fiori/dist/NotificationListItem.js'; import { withWebComponent } from '../../internal/withWebComponent.js'; /** * The `NotificationListItem` is a type of list item, meant to display notifications. * * The component has a rich set of various properties that allows the user to set `avatar`, `menu`, `titleText`, descriptive `content` * and `footnotes` to fully describe a notification. * * The user can: * * - display a `Close` button * - can control whether the `titleText` and `description` should wrap or truncate * and display a `ShowMore` button to switch between less and more information * - add actions by using the `ui5-menu` component * * **Note:** Adding custom actions by using the `ui5-notification-action` component is deprecated as of version 2.0! * * ### Usage * The component can be used in a standard `ui5-list`. * * ### Keyboard Handling * * #### Basic Navigation * The user can use the following keyboard shortcuts to perform actions (such as select, delete): * * - [Enter] - select an item (trigger "item-click" event) * - [Delete] - close an item (trigger "item-close" event) * * #### Fast Navigation * This component provides a fast navigation using the following keyboard shortcuts: * * - [Shift] + [Enter] - 'More'/'Less' link will be triggered * - [Shift] + [F10] - 'Menu' (Actions) button will be triggered (clicked) * * * * __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/) */ const NotificationListItem = withWebComponent('ui5-li-notification', ['importance', 'loadingDelay', 'state', 'titleText', 'wrappingType'], ['loading', 'read', 'showClose'], ['avatar', 'footnotes', 'menu'], ['close']); NotificationListItem.displayName = 'NotificationListItem'; export { NotificationListItem };