import React from "react";
import { PinkButton } from "./button";

type TProps = {
    textButton: string
    onClickButton: () => void
    titleText?: string
    descriptText: string
    accessCode?: string
}

export const ContentContainer:React.FC<TProps> = React.memo((props) => {
    return <div className="main-part-text-container">
        {
            props.titleText && 
            <span className="main-part-text-title">
                {props.titleText}
            </span>
        }        
        <span className="main-part-text-descript">
            {props.descriptText}
        </span>
        {
            props.accessCode &&
            <span className="main-part-text-access-code">{props.accessCode}</span>
        }
        <PinkButton
            onClick={props.onClickButton}
            textButton={props.textButton}                
        />
    </div>
})