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 | tag: tagPropType,
|
8 | className: PropTypes.string,
|
9 | cssModule: PropTypes.object,
|
10 | };
|
11 |
|
12 | function PopoverHeader(props) {
|
13 | const { className, cssModule, tag: Tag = 'h3', ...attributes } = props;
|
14 |
|
15 | const classes = mapToCssModules(
|
16 | classNames(className, 'popover-header'),
|
17 | cssModule,
|
18 | );
|
19 |
|
20 | return <Tag {...attributes} className={classes} />;
|
21 | }
|
22 |
|
23 | PopoverHeader.propTypes = propTypes;
|
24 |
|
25 | export default PopoverHeader;
|
26 |
|
\ | No newline at end of file |