1 | import React from 'react';
|
2 | import PropTypes from 'prop-types';
|
3 | import classNames from 'classnames';
|
4 | import { mapToCssModules, tagPropType } from './utils';
|
5 |
|
6 | const propTypes = {
|
7 |
|
8 | className: PropTypes.string,
|
9 |
|
10 | cssModule: PropTypes.object,
|
11 |
|
12 | tag: tagPropType,
|
13 | active: PropTypes.bool,
|
14 | };
|
15 |
|
16 | function NavbarText(props) {
|
17 | const {
|
18 | className,
|
19 | cssModule,
|
20 | active,
|
21 | tag: Tag = 'span',
|
22 | ...attributes
|
23 | } = props;
|
24 |
|
25 | const classes = mapToCssModules(
|
26 | classNames(className, 'navbar-text'),
|
27 | cssModule,
|
28 | );
|
29 |
|
30 | return <Tag {...attributes} className={classes} />;
|
31 | }
|
32 |
|
33 | NavbarText.propTypes = propTypes;
|
34 |
|
35 | export default NavbarText;
|
36 |
|
\ | No newline at end of file |