UNPKG

@braineet/ui

Version:

Braineet design system

23 lines 1.2 kB
var _excluded = ["label"]; function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; } import React from 'react'; import { MenuGroup as BaseMenuGroup, MenuGroupLabel } from 'ariakit/menu'; import Label from '../label'; import { jsx as _jsx, 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] })); });