forked from 1Hive/gardens-ui
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMainView.js
More file actions
45 lines (40 loc) · 910 Bytes
/
MainView.js
File metadata and controls
45 lines (40 loc) · 910 Bytes
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
45
import React from 'react'
import { GU, useViewport } from '@tecommons/ui'
import ConvictionBanner from './ConvictionBanner'
import Footer from './Footer'
import Header from './Header'
import Layout from './Layout'
function MainView({ children }) {
const { below } = useViewport()
const compactMode = below('medium')
return (
<div
css={`
display: flex;
flex-direction: column;
height: 100vh;
`}
>
<div>
<ConvictionBanner />
</div>
<Header compact={compactMode} />
<div
css={`
${!compactMode && `transform: translateY(-${4 * GU}px);`}
flex: 1 0 auto;
`}
>
<div
css={`
height: 100%;
`}
>
<Layout>{children}</Layout>
</div>
<Footer compact={compactMode} />
</div>
</div>
)
}
export default MainView