UNPKG

@braineet/ui

Version:

Braineet design system

23 lines 1.43 kB
var _excluded = ["label", "children"]; 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 { ComboboxGroup as BaseComboboxGroup, ComboboxGroupLabel } from 'ariakit/combobox'; import Label from '../label'; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export var ComboboxGroup = function ComboboxGroup(_ref) { var label = _ref.label, children = _ref.children, props = _objectWithoutPropertiesLoose(_ref, _excluded); return /*#__PURE__*/_jsxs(BaseComboboxGroup, _extends({}, props, { children: [label && /*#__PURE__*/_jsx(Label, { forwardedAs: ComboboxGroupLabel, size: "xs", fontFamily: "display", color: "black20", margin: "1rem 0 0.5rem 0.75rem", children: label }), children] })); };