mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 02:29:10 +00:00
absolutely massive typescript porting time
This commit is contained in:
parent
01f238f515
commit
30d08a630f
159 changed files with 2563 additions and 3861 deletions
38
packages/roleypoly-ui/components/layout.tsx
Normal file
38
packages/roleypoly-ui/components/layout.tsx
Normal file
|
@ -0,0 +1,38 @@
|
|||
import * as React from 'react'
|
||||
import GlobalColors from './global-colors'
|
||||
import SocialCards from './social-cards'
|
||||
import HeaderBar from '../containers/header-bar'
|
||||
import { User } from '../stores/user'
|
||||
import styled from 'styled-components'
|
||||
import Router from 'next/router'
|
||||
|
||||
const LayoutWrapper = styled.div`
|
||||
transition: opacity 0.1s ease-out;
|
||||
opacity: 0;
|
||||
|
||||
.wf-active &,
|
||||
.force-active & {
|
||||
opacity: 1;
|
||||
}
|
||||
`
|
||||
|
||||
const ContentBox = styled.div`
|
||||
margin: 0 auto;
|
||||
width: 960px;
|
||||
max-width: 100vw;
|
||||
padding: 5px;
|
||||
padding-top: 50px;
|
||||
`
|
||||
|
||||
const Layout = ({ children, user, noBackground, router }: {children: React.ReactElement<any>, user: User, noBackground: boolean, router: typeof Router }) => <>
|
||||
<GlobalColors />
|
||||
<SocialCards />
|
||||
<LayoutWrapper>
|
||||
<HeaderBar user={user} noBackground={noBackground} router={router} />
|
||||
<ContentBox>
|
||||
{children}
|
||||
</ContentBox>
|
||||
</LayoutWrapper>
|
||||
</>
|
||||
|
||||
export default Layout
|
Loading…
Add table
Add a link
Reference in a new issue