aboutsummaryrefslogtreecommitdiff
path: root/components/page.tsx
blob: 506e2db2a35fb59d139885b6258cab5be7dd7f2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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>;
	}
}