@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
30 lines (29 loc) • 1.49 kB
JavaScript
'use client';
import '@ui5/webcomponents/dist/MenuItemGroup.js';
import { withWebComponent } from '@ui5/webcomponents-react-base';
/**
* The `MenuItemGroup` component represents a group of items designed for use inside a `Menu`.
* Items belonging to the same group should be wrapped by a `MenuItemGroup`.
* Each group can have an `checkMode` property, which defines the check mode for the items within the group.
* The possible values for `checkMode` are:
* - 'None' (default) - no items can be checked
* - 'Single' - Only one item can be checked at a time
* - 'Multiple' - Multiple items can be checked simultaneously
*
* **Note:** If the `checkMode` property is set to 'Single', only one item can remain checked at any given time.
* If multiple items are marked as checked, the last checked item will take precedence.
*
* ### Usage
*
* `MenuItemGroup` represents a collection of `MenuItem` components that can have the same check mode.
* The items are addeed to the group's `items` slot.
*
*
*
* __Note:__ This is a UI5 Web Component! [MenuItemGroup UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/MenuItemGroup) | [Repository](https://github.com/UI5/webcomponents)
*
* @since [2.12.0](https://github.com/UI5/webcomponents/releases/tag/v2.12.0) of __@ui5/webcomponents__.
*/
const MenuItemGroup = withWebComponent('ui5-menu-item-group', ['checkMode'], [], [], []);
MenuItemGroup.displayName = 'MenuItemGroup';
export { MenuItemGroup };