UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

28 lines (27 loc) 1.4 kB
'use client'; import { withWebComponent } from '@ui5/webcomponents-react-base'; /** * The `Button` component represents a simple push button. * It enables users to trigger actions by clicking or tapping the `Button`, or by pressing * certain keyboard keys, such as Enter. * * ### Usage * * For the `Button` UI, you can define text, icon, or both. You can also specify * whether the text or the icon is displayed first. * * You can choose from a set of predefined types that offer different * styling to correspond to the triggered action. * * You can set the `Button` as enabled or disabled. An enabled * `Button` can be pressed by clicking or tapping it. The button changes * its style to provide visual feedback to the user that it is pressed or hovered over with * the mouse cursor. A disabled `Button` appears inactive and cannot be pressed. * * * * __Note:__ This is a UI5 Web Component! [Button UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/Button) | [Repository](https://github.com/UI5/webcomponents) */ const Button = withWebComponent('ui5-button', ['accessibilityAttributes', 'accessibleDescription', 'accessibleName', 'accessibleNameRef', 'accessibleRole', 'design', 'endIcon', 'form', 'icon', 'loadingDelay', 'tooltip', 'type'], ['disabled', 'loading', 'submits'], ['badge'], ['click']); Button.displayName = 'Button'; export { Button };