@elastic/eui
Version:
Elastic UI Component Library
33 lines (32 loc) • 1.5 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "className", "gutterSize"];
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import React, { forwardRef } from 'react';
import classNames from 'classnames';
import { useEuiMemoizedStyles } from '../../../services';
import { euiBadgeGroupStyles } from './badge_group.styles';
import { jsx as ___EmotionJSX } from "@emotion/react";
export var GUTTER_SIZES = ['none', 'xs', 's'];
export var EuiBadgeGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
var children = _ref.children,
className = _ref.className,
_ref$gutterSize = _ref.gutterSize,
gutterSize = _ref$gutterSize === void 0 ? 'xs' : _ref$gutterSize,
rest = _objectWithoutProperties(_ref, _excluded);
var classes = classNames('euiBadgeGroup', className);
var styles = useEuiMemoizedStyles(euiBadgeGroupStyles);
var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
return ___EmotionJSX("div", _extends({
css: cssStyles,
className: classes,
ref: ref
}, rest), children);
});
EuiBadgeGroup.displayName = 'EuiBadgeGroup';