aboutsummaryrefslogtreecommitdiff
path: root/components/page.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/page.tsx')
-rw-r--r--components/page.tsx32
1 files changed, 32 insertions, 0 deletions
diff --git a/components/page.tsx b/components/page.tsx
new file mode 100644
index 0000000..d8a4a2b
--- /dev/null
+++ b/components/page.tsx
@@ -0,0 +1,32 @@
+import { Component, CSSProperties, ReactNode } from 'react';
+
+interface CenteredPageProps {
+ width?: number;
+ children?: ReactNode;
+ style?: CSSProperties;
+}
+
+export function CenteredPage (props: CenteredPageProps) {
+ return <div className="CenteredPageOuter" style={{
+ maxWidth: props.width,
+ margin: "0 auto"
+ }}>
+ <div className="CenteredPageInner" style={{
+ margin: "0 6px",
+ lineHeight: 0,
+ ...props.style
+ }}>{props.children}</div>
+ </div>;
+}
+
+export class PageTitle extends Component {
+ render () {
+ return <h1 style={{
+ color: "var(--text-alt)",
+ marginLeft: 6,
+ marginTop: 32,
+ marginBottom: 64,
+ fontSize: 25,
+ }}>{this.props.children}</h1>;
+ }
+}