-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathHome.styled.ts
More file actions
190 lines (161 loc) · 4.31 KB
/
Home.styled.ts
File metadata and controls
190 lines (161 loc) · 4.31 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
import { css, Theme } from '@emotion/react';
import styled from '@emotion/styled';
import WebApiQueueBase from './sections/WebApiQueue/WebApiQueue.tsx';
import RequestAnimationFrameQueueBase from './sections/RequestAnimationFrameQueue/RequestAnimationFrameQueue.tsx';
import CallStackBase from './sections/Callstack/Callstack.tsx';
import ConsoleBase from './sections/Console/Console.tsx';
import TasksQueueBase from './sections/TasksQueue/TasksQueue.tsx';
import MicroTasksQueueBase from './sections/MicroTasksQueue/MicroTasksQueue.tsx';
import InfoBase from './sections/Info/Info.tsx';
import ConfiguratorBase from './sections/Configurator/Configurator.tsx';
import EventLoopBase from 'pages/home/sections/EventLoop/EventLoop.tsx';
export const sharedColumnStyles = ({ theme }: { theme: Theme }) => css`
display: flex;
flex-direction: column;
gap: 20px;
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-grow: 0;
flex-shrink: 0;
overflow: hidden;
}
`;
export const Layout = styled.div(
({ theme }) => css`
flex: 1;
display: flex;
padding: 8px;
flex-direction: column;
gap: 20px;
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
padding: 20px;
flex-direction: row;
overflow: hidden;
}
`
);
export const WideColumn = styled.div(
({ theme }) => css`
${sharedColumnStyles({ theme })};
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: calc(43% - 20px);
}
`
);
export const NarrowColumn = styled.div(
({ theme }) => css`
${sharedColumnStyles({ theme })};
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 14%;
}
`
);
export const BaseLayoutElement = styled.div(
({ theme: { custom } }) => css`
border: 1px solid ${custom.sys.colors.border};
background: ${custom.sys.colors.container};
transition:
background-color ${custom.sys.transitions.color},
border-color ${custom.sys.transitions.color};
margin: 0;
padding: 10px;
`
);
export const List = styled(BaseLayoutElement)`
display: flex;
flex-direction: column;
padding: 10px;
gap: 20px;
overflow: auto;
position: relative;
`;
export const sharedComponentStyles = ({ theme }: { theme: Theme }) => css`
min-height: 10vh;
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
min-height: unset;
}
`;
export const Info = styled(InfoBase)(
({ theme }) => css`
display: flex;
flex-direction: column;
justify-content: center;
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 10%;
}
`
);
export const Configurator = styled(ConfiguratorBase)(
({ theme }) => css`
padding: 0;
min-height: 50vh;
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 75%;
min-height: unset;
}
`
);
export const WebApiQueue = styled(WebApiQueueBase)(
({ theme }) => css`
${sharedComponentStyles({ theme })};
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 15%;
}
`
);
export const CallStack = styled(CallStackBase)(
({ theme }) => css`
${sharedComponentStyles({ theme })};
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 40%;
}
`
);
export const Console = styled(ConsoleBase)(
({ theme }) => css`
${sharedComponentStyles({ theme })};
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 60%;
}
`
);
export const RequestAnimationFrameQueue = styled(
RequestAnimationFrameQueueBase
)(
({ theme }) => css`
${sharedComponentStyles({ theme })};
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 15%;
}
`
);
export const TasksQueue = styled(TasksQueueBase)(
({ theme }) => css`
${sharedComponentStyles({ theme })};
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 15%;
}
`
);
export const MicroTasksQueue = styled(MicroTasksQueueBase)(
({ theme }) => css`
${sharedComponentStyles({ theme })};
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 15%;
}
`
);
export const EventLoop = styled(EventLoopBase)(
({ theme }) => css`
display: flex;
flex-direction: column;
align-items: center;
overflow: auto;
position: relative;
min-height: 40vh;
@media (min-width: ${theme.custom.sys.breakpoints.desktop}px) {
flex-basis: 45%;
min-height: unset;
overflow: hidden;
}
`
);