mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
28 lines
590 B
JavaScript
28 lines
590 B
JavaScript
import React, {PropTypes} from 'react';
|
|
import classnames from 'classnames';
|
|
|
|
const ModalHeader = ({hideCloseButton, className, children}) => {
|
|
let closeButton = null;
|
|
|
|
if (!hideCloseButton) {
|
|
closeButton = (
|
|
<button className="btn btn--compact modal__close-btn" data-close-modal="true">
|
|
<i className="fa fa-times"></i>
|
|
</button>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<div className={classnames('modal__header', className)}>
|
|
{closeButton}
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
ModalHeader.propTypes = {
|
|
hideCloseButton: PropTypes.bool
|
|
};
|
|
|
|
export default ModalHeader;
|