import { CSSProperties, FC, ReactNode } from "react";
import styles from "./PageContainer.module.css";

type Props = {
    children: ReactNode;
    style?: CSSProperties;
    center?: boolean;
};

const PageContainer: FC<Props> = ({ children, style, center }) => {
    return (
        <div
            className={styles.container}
            style={{
                ...style,
                alignItems: center ? "center" : "",
                justifyContent: center ? "center" : "",
            }}>
            {children}
        </div>
    );
};

export default PageContainer;
