mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
d89aa525da
* 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
30 lines
667 B
JavaScript
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;
|