diff options
author | Loek Le Blansch <32883851+lonkaars@users.noreply.github.com> | 2021-04-21 10:40:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 10:40:52 +0200 |
commit | dadc722875b2095bd3d6c4ab628a644197b85f7b (patch) | |
tree | 9e061708fad5bfdcc40f4c40662d77fbc42cfe64 /components/page.tsx | |
parent | c603cb79e7ba7fdbb101a506e36f6d8d70b3a8f4 (diff) | |
parent | 5cb39d822716c650e520c3855ef049ff308a348c (diff) |
Merge pull request #12 from lonkaars/css-files
big redesign css move thing
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>; } |