diff options
Diffstat (limited to 'components/page.tsx')
-rw-r--r-- | components/page.tsx | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/components/page.tsx b/components/page.tsx index 506e2db..b8e8770 100644 --- a/components/page.tsx +++ b/components/page.tsx @@ -1,27 +1,15 @@ -import { Component, CSSProperties, ReactNode } from 'react'; +import { Component, ReactNode } from 'react'; -interface CenteredPageProps { +export function CenteredPage(props: { width?: number; children?: ReactNode; - style?: CSSProperties; -} - -export function CenteredPage(props: CenteredPageProps) { + className?: string; +}) { return <div className='CenteredPageOuter' - style={{ - maxWidth: props.width, - margin: '0 auto', - }} + style={{ maxWidth: props.width }} > - <div - className='CenteredPageInner' - style={{ - margin: '0 6px', - lineHeight: 0, - ...props.style, - }} - > + <div className={'CenteredPageInner ' + props.className}> {props.children} </div> </div>; @@ -29,15 +17,7 @@ export function CenteredPage(props: CenteredPageProps) { export class PageTitle extends Component { render() { - return <h1 - style={{ - color: 'var(--text-alt)', - marginLeft: 6, - marginTop: 32, - marginBottom: 64, - fontSize: 25, - }} - > + return <h1 className='pageTitle'> {this.props.children} </h1>; } |