import React, { forwardRef } from "react"; import cn from "classnames"; import PropTypes from "prop-types"; export interface IModalHeaderProps { onClose?: () => void; className?: string; ["data-testid"]?: string; } const ModalHeader: React.FC = forwardRef( (props, ref: React.Ref) => { const { onClose, children, className } = props; const dataTestId = props["data-testid"] || "honey-ui-modal-header"; return (
{children} {onClose ? ( ) : null}
); } ); ModalHeader.displayName = "ModalHeader"; ModalHeader.propTypes = { onClose: PropTypes.func, className: PropTypes.string }; export default ModalHeader;