2016-07-20 18:35:08 +00:00
|
|
|
import React, {PropTypes} from 'react';
|
2016-07-16 02:06:10 +00:00
|
|
|
import classnames from 'classnames';
|
2016-04-15 05:23:54 +00:00
|
|
|
|
2016-07-20 18:35:08 +00:00
|
|
|
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
|
|
|
|
};
|
2016-04-15 05:23:54 +00:00
|
|
|
|
|
|
|
export default ModalHeader;
|