@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
21 lines (20 loc) • 1.17 kB
JavaScript
'use client';
import '@ui5/webcomponents/dist/ToggleButton.js';
import { withWebComponent } from '../../internal/withWebComponent.js';
/**
* The `ToggleButton` component is an enhanced `Button`
* that can be toggled between pressed and normal states.
* Users can use the `ToggleButton` as a switch to turn a setting on or off.
* It can also be used to represent an independent choice similar to a check box.
*
* Clicking or tapping on a `ToggleButton` changes its state to `pressed`. The button returns to
* its initial state when the user clicks or taps on it again.
* By applying additional custom CSS-styling classes, apps can give a different style to any `ToggleButton`.
*
*
*
* __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)
*/
const ToggleButton = withWebComponent('ui5-toggle-button', ['accessibilityAttributes', 'accessibleName', 'accessibleNameRef', 'accessibleRole', 'design', 'endIcon', 'icon', 'tooltip', 'type'], ['disabled', 'pressed', 'submits'], [], ['click']);
ToggleButton.displayName = 'ToggleButton';
export { ToggleButton };