diff options
author | crupest <crupest@outlook.com> | 2023-07-21 17:02:05 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-07-21 17:02:05 +0800 |
commit | d7b050ef7f047f841ffcda96fbdc9857574e97b9 (patch) | |
tree | b37ccef507cbb6b9ca497715088ffe313e3d2011 /FrontEnd/src/views/common/Page.tsx | |
parent | 2226efed8c8604a938d060d62565b611722e837c (diff) | |
download | timeline-d7b050ef7f047f841ffcda96fbdc9857574e97b9.tar.gz timeline-d7b050ef7f047f841ffcda96fbdc9857574e97b9.tar.bz2 timeline-d7b050ef7f047f841ffcda96fbdc9857574e97b9.zip |
...
Diffstat (limited to 'FrontEnd/src/views/common/Page.tsx')
-rw-r--r-- | FrontEnd/src/views/common/Page.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/FrontEnd/src/views/common/Page.tsx b/FrontEnd/src/views/common/Page.tsx new file mode 100644 index 00000000..86fdb2f5 --- /dev/null +++ b/FrontEnd/src/views/common/Page.tsx @@ -0,0 +1,15 @@ +import { ComponentPropsWithoutRef, Ref } from "react"; +import classNames from "classnames"; + +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> + ); +} |