insomnia/app/ui/components/base/ModalHeader.js
Gregory Schier d89aa525da Workspace Settings (#66)
* Started on workspace settings modal

* Added keyboard shortcut for workspace settings

* More work on workspace settings

* Actually use client certificates

* Only add cmd+w on mac closes #64
2016-11-29 12:55:31 -08:00

30 lines
667 B
JavaScript

import React, {PropTypes} from 'react';
import classnames from 'classnames';
const ModalHeader = ({hideCloseButton, className, children}) => {
let closeButton = null;
if (!hideCloseButton) {
closeButton = (
<button type="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)}>
<div className="modal__header__children">
{children}
</div>
{closeButton}
</div>
);
};
ModalHeader.propTypes = {
hideCloseButton: PropTypes.bool
};
export default ModalHeader;