import Title, { TitleProps } from "antd/es/typography/Title";
import { FunctionComponent, ReactNode } from "react";

interface ProTitle extends TitleProps {
  children?: ReactNode;
  className?: string;
}

const ProTitle: FunctionComponent<ProTitle> = ({
  children,
  className,
  ...other
}) => {
  // const { locale } = useAppSelector((state) => state.locale);
  return (
    <Title
      className={className}
      // style={{textAlign: getDirection(locale) === "rtl" ? "right" : "left"}}
      {...other}
    >
      {children}
    </Title>
  );
};

export default ProTitle;
