UNPKG

1.61 kBJavaScriptView Raw
1import _extends from 'babel-runtime/helpers/extends';
2import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
4import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
5import _inherits from 'babel-runtime/helpers/inherits';
6
7var _class, _temp;
8
9import React, { Component } from 'react';
10import PropTypes from 'prop-types';
11import classNames from 'classnames';
12
13var Group = (_temp = _class = function (_Component) {
14 _inherits(Group, _Component);
15
16 function Group() {
17 _classCallCheck(this, Group);
18
19 return _possibleConstructorReturn(this, _Component.apply(this, arguments));
20 }
21
22 Group.prototype.render = function render() {
23 var _props = this.props,
24 className = _props.className,
25 prefix = _props.prefix,
26 children = _props.children,
27 rtl = _props.rtl,
28 others = _objectWithoutProperties(_props, ['className', 'prefix', 'children', 'rtl']);
29
30 var clazz = classNames((prefix || 'next-') + 'tag-group', className);
31
32 return React.createElement(
33 'div',
34 _extends({ className: clazz, dir: rtl ? 'rtl' : undefined }, others),
35 children
36 );
37 };
38
39 return Group;
40}(Component), _class.propTypes = {
41 prefix: PropTypes.string,
42 className: PropTypes.any,
43 children: PropTypes.node,
44 rtl: PropTypes.bool
45}, _class.defaultProps = {
46 prefix: 'next-',
47 rtl: false
48}, _temp);
49Group.displayName = 'Group';
50
51
52export default Group;
\No newline at end of file