Skip to content

Commit 5cb9097

Browse files
committed
added PayLayout
1 parent d2626ca commit 5cb9097

File tree

10 files changed

+334
-175
lines changed

10 files changed

+334
-175
lines changed

library/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export * from "./components"
2+
export * from "./layouting"
23
export * from "./theming"
34
export * from "./localization"
45
export * from "./utils"
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import { token } from "@atlaskit/tokens"
2+
import styled from "@emotion/styled"
3+
4+
const Page = styled.div`
5+
width: 100%;
6+
height: 100%;
7+
min-height: 0;
8+
display: flex;
9+
flex-direction: column;
10+
overflow: hidden;
11+
background-color: ${token("elevation.surface", "#fff")};
12+
`
13+
14+
const PageHeader = styled.div`
15+
background: ${token("elevation.surface.raised", "#fafbfc")};
16+
padding-top: 20px;
17+
padding-left: 20px;
18+
padding-right: 14px;
19+
border-bottom: 1px solid ${token("color.border", "#091e4224")};
20+
`
21+
22+
const PageHeaderTitle = styled.div`
23+
margin-bottom: 8px;
24+
`
25+
26+
const PageHeaderSubTitle = styled.div`
27+
color: ${token("color.text.subtlest", "#172B4D")};
28+
margin-top: 10px;
29+
margin-bottom: 10px;
30+
`
31+
32+
const PageHeaderLine = styled.div`
33+
display: flex;
34+
width: 100%;
35+
gap: 4px;
36+
margin-bottom: 8px;
37+
`
38+
39+
const PageBody = styled.div`
40+
display: flex;
41+
flex-direction: column;
42+
min-height: 0;
43+
flex: 1;
44+
min-width: 0;
45+
margin-bottom: 4px;
46+
`
47+
48+
const PageBodyHeader = styled.div`
49+
z-index: 0;
50+
background-color: ${token("elevation.surface.raised", "#fafbfc")};
51+
padding-top: 14px;
52+
padding-bottom: 10px;
53+
padding-left: 20px;
54+
padding-right: 14px;
55+
box-shadow: 0 4px 4px ${token("color.border", "#091e4224")};
56+
`
57+
58+
const PageBodyContent = styled.div`
59+
flex: 1;
60+
overflow-y: auto;
61+
min-height: 0;
62+
padding-left: 20px;
63+
padding-right: 14px;
64+
padding-bottom: 20px;
65+
padding-top: 10px;
66+
`
67+
68+
const PageBodyFooter = styled.div`
69+
display: flex;
70+
min-height: 0;
71+
justify-content: center;
72+
background-color: ${token("elevation.surface.raised", "#fafbfc")};
73+
padding-top: 4px;
74+
border-top: 1px solid ${token("color.border", "#091e4224")};
75+
box-shadow: 0 -4px 4px ${token("color.border", "#091e4224")};
76+
`
77+
78+
const PageLayout = {
79+
Page,
80+
PageHeader,
81+
PageHeaderTitle,
82+
PageHeaderSubTitle,
83+
PageBody,
84+
PageBodyHeader,
85+
PageBodyContent,
86+
PageBodyFooter,
87+
PageHeaderLine,
88+
}
89+
export default PageLayout

library/src/layouting/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import PageLayout from "./PageLayout"
2+
export { PageLayout }

0 commit comments

Comments
 (0)