import React from 'react'; import PropTypes from 'prop-types'; import Styled from './styles'; import Left from './left/component'; import Right from './right/component'; const Header = ({ leftButtonProps, rightButtonProps, customRightButton, 'data-test': dataTest, }) => { const renderCloseButton = () => ( ); const renderCustomRightButton = () => ( {customRightButton} ); return ( {customRightButton ? renderCustomRightButton() : rightButtonProps ? renderCloseButton() : null} ); } Header.propTypes = { leftButtonProps: PropTypes.object, rightButtonProps: PropTypes.object, customRightButton: PropTypes.element, dataTest: PropTypes.string, }; export default Header;