import type { FC, PropsWithChildren, ReactElement } from "react";
import { useContext } from "react";
import type { TModalContext } from "../config/types";
import { ModalContext } from "../context";

/**
 * Заголовок модального окна
 * @returns {ReactElement}
 */
export const ModalTitle: FC<PropsWithChildren> = ({ children }): ReactElement => {

  const { getCN } = useContext<TModalContext>(ModalContext);

  return (
    <div className={getCN("title")}>
      {children}
    </div>
  );

};
