import React, { forwardRef } from "react";
import cn from "classnames";
import PropTypes from "prop-types";

export interface IModalTitleProps {
  className?: string;
}

const ModalTitle: React.FC<IModalTitleProps> = forwardRef(
  ({ children, className }, ref: React.Ref<HTMLHeadingElement>) => {
    return (
      <h5 ref={ref} className={cn("modal-title", className)}>
        {children}
      </h5>
    );
  }
);

ModalTitle.displayName = "ModalTitle";

ModalTitle.propTypes = {
  className: PropTypes.string
};

export default ModalTitle;
