UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

43 lines (42 loc) 1.97 kB
'use client'; import '@ui5/webcomponents-fiori/dist/NotificationListItem.js'; import { withWebComponent } from '@ui5/webcomponents-react-base'; /** * 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 should be used inside a `NotificationList`. * * ### 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! [NotificationListItem UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/fiori/NotificationListItem) | [Repository](https://github.com/UI5/webcomponents) */ const NotificationListItem = withWebComponent('ui5-li-notification', ['importance', 'loadingDelay', 'state', 'titleText', 'wrappingType'], ['loading', 'read', 'showClose'], ['avatar', 'footnotes', 'menu'], ['click', 'close']); NotificationListItem.displayName = 'NotificationListItem'; export { NotificationListItem };