UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

30 lines (29 loc) 1.12 kB
'use client'; import '@ui5/webcomponents/dist/Toast.js'; import { withWebComponent } from '../../internal/withWebComponent.js'; /** * The `Toast` is a small, non-disruptive popup for success or information messages that * disappears automatically after a few seconds. * * ### Usage * * #### When to use: * * - You want to display a short success or information message. * - You do not want to interrupt users while they are performing an action. * - You want to confirm a successful action. * * #### When not to use: * * - You want to display error or warning message. * - You want to interrupt users while they are performing an action. * - You want to make sure that users read the message before they leave the page. * - You want users to be able to copy some part of the message text. * * * * __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/) */ const Toast = withWebComponent('ui5-toast', ['duration', 'placement'], ['open'], [], ['close']); Toast.displayName = 'Toast'; export { Toast };