UNPKG

@braineet/ui

Version:

Braineet design system

24 lines 1.4 kB
var _excluded = ["label"]; function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } import React from 'react'; import { MenuGroup as BaseMenuGroup, MenuGroupLabel } from 'ariakit/menu'; import Label from '../label'; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export var MenuGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) { var label = _ref.label, props = _objectWithoutPropertiesLoose(_ref, _excluded); return /*#__PURE__*/_jsxs(BaseMenuGroup, _extends({ ref: ref }, props, { children: [label && /*#__PURE__*/_jsx(Label, { forwardedAs: MenuGroupLabel, size: "xs", fontFamily: "display", color: "black20", margin: "1rem 0 0.5rem 0.75rem", children: label }), props.children] })); });