import { CSSProperties, FC, ReactNode } from "react";
import "./index.scss";

export interface PageContainerProps {
  title: string;
  style?: CSSProperties;
  headerSlot?: ReactNode;
  children?: ReactNode;
}

export const PageContainer: FC<PageContainerProps> = ({
  title,
  style,
  headerSlot,
  children,
}) => {
  return (
    <div className="page-container" style={style}>
      <div className="page-container-header">
        <h3>{title}</h3>

        {headerSlot}
      </div>
      <div className="page-container-main">{children}</div>
    </div>
  );
};
