forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmbedSkeleton.js
More file actions
46 lines (44 loc) · 1.06 KB
/
EmbedSkeleton.js
File metadata and controls
46 lines (44 loc) · 1.06 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
import React from 'react';
import { Header, NavigationBar, StatusBar } from './_EmbedSkeleton.elements';
export default ({ id, screenshotUrl, style }) => (
<div
style={{
display: 'flex',
flexDirection: 'column',
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0,
overflow: 'hidden',
zIndex: 10,
...style,
}}
>
<Header />
<NavigationBar />
<div
style={{
position: 'relative',
height: '100%',
width: '100%',
overflow: 'hidden',
}}
>
<div
style={{
// TODO CHANGE THIS TO THE URL GIVEn TO THE SANDBOX SO IT CAN BE PReCHACED
backgroundImage: `url("${screenshotUrl ||
`https://codesandbox.io/api/v1/sandboxes/${id}/screenshot.png`}")`,
backgroundRepeat: 'no-repeat',
backgroundPositionX: 'center',
transform: 'scale(1.025, 1.025)',
width: '100%',
height: '100%',
filter: 'blur(2px)',
}}
/>
</div>
<StatusBar />
</div>
);