diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-04-21 09:17:48 +0200 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-04-21 09:17:48 +0200 |
commit | 93f24011f9613b7785b37dc4b0c963d9be22ba30 (patch) | |
tree | 26e1a867623cc68e2b8293327572282e461568a6 /components/page.tsx | |
parent | 7e7bf87896b6494886b3457a72864a498906f5b3 (diff) |
more components without inline css
Diffstat (limited to 'components/page.tsx')
-rw-r--r-- | components/page.tsx | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/components/page.tsx b/components/page.tsx index b8e3dac..b8e8770 100644 --- a/components/page.tsx +++ b/components/page.tsx @@ -1,26 +1,15 @@ -import { Component, CSSProperties, ReactNode } from 'react'; +import { Component, ReactNode } from 'react'; export function CenteredPage(props: { width?: number; children?: ReactNode; - style?: CSSProperties; className?: string; }) { return <div className='CenteredPageOuter' - style={{ - maxWidth: props.width, - margin: '0 auto', - }} + style={{ maxWidth: props.width }} > - <div - className={'CenteredPageInner ' + props.className} - style={{ - margin: '0 6px', - lineHeight: 0, - ...props.style, - }} - > + <div className={'CenteredPageInner ' + props.className}> {props.children} </div> </div>; @@ -28,15 +17,7 @@ export function CenteredPage(props: { 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>; } |