aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/components/Page.tsx
blob: 8c9febcc36b242f4c88315a0b39dff95fb2898c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { ComponentPropsWithoutRef, Ref } from "react";
import classNames from "classnames";

import "./Page.css";

interface PageProps extends ComponentPropsWithoutRef<"div"> {
  noTopPadding?: boolean;
  pageRef?: Ref<HTMLDivElement>;
}

export default function Page({ noTopPadding, pageRef, className, children }: PageProps) {
  return (
    <div ref={pageRef} className={classNames(className, "cru-page", noTopPadding && "cru-page-no-top-padding")}>
      {children}
    </div>
  );
}