import React from "react";

type TProps = {
    onClick: () => void
    title: string
    isBackButton?: boolean
    onClickBackButton?: () => void
}

export const MobileAddPartHeader:React.FC<TProps> = React.memo((props) => {
    return <div className="mobile-users-part-header">
        <span className="mobile-users-part-header-title">
            {
                props.isBackButton
                ? <button className="mobile-users-part-header-back-button" onClick={() => props.onClickBackButton()}></button>
                : null
            }
            {props.title}
        </span>
        <button 
            className="mobile-users-part-header-close-button" 
            onClick={() => props.onClick()} 
        ></button>
    </div>
})