diff options
Diffstat (limited to 'FrontEnd/src/components/Page.tsx')
-rw-r--r-- | FrontEnd/src/components/Page.tsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/FrontEnd/src/components/Page.tsx b/FrontEnd/src/components/Page.tsx new file mode 100644 index 00000000..8c9febcc --- /dev/null +++ b/FrontEnd/src/components/Page.tsx @@ -0,0 +1,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> + ); +} |