UNPKG

1 kBJavaScriptView Raw
1import _extends from "@babel/runtime/helpers/esm/extends";
2import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3import React from 'react';
4import PropTypes from 'prop-types';
5import classNames from 'classnames';
6import { mapToCssModules, tagPropType } from './utils';
7var propTypes = {
8 tag: tagPropType,
9 className: PropTypes.string,
10 cssModule: PropTypes.object
11};
12var defaultProps = {
13 tag: 'span'
14};
15
16var NavbarText = function NavbarText(props) {
17 var className = props.className,
18 cssModule = props.cssModule,
19 active = props.active,
20 Tag = props.tag,
21 attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "active", "tag"]);
22
23 var classes = mapToCssModules(classNames(className, 'navbar-text'), cssModule);
24 return React.createElement(Tag, _extends({}, attributes, {
25 className: classes
26 }));
27};
28
29NavbarText.propTypes = propTypes;
30NavbarText.defaultProps = defaultProps;
31export default NavbarText;
\No newline at end of file