forked from insinfo/canva-clone2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PreviewModal.tsx
44 lines (41 loc) · 938 Bytes
/
PreviewModal.tsx
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
import XIcon from '@duyank/icons/regular/X';
import { Preview } from '@lidojs/design-editor';
import React, { FC } from 'react';
interface PreviewModalProps {
onClose: () => void;
}
const PreviewModal: FC<PreviewModalProps> = ({ onClose }) => {
return (
<div
css={{
position: 'fixed',
inset: 0,
zIndex: 1040,
background: 'rgba(13,18,22,.95)',
}}
>
<Preview />
<div
css={{
background: 'rgba(255,255,255,0.3)',
width: 60,
height: 60,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
position: 'fixed',
right: 24,
top: 24,
borderRadius: '50%',
fontSize: 36,
color: '#fff',
cursor: 'pointer',
}}
onClick={onClose}
>
<XIcon />
</div>
</div>
);
};
export default PreviewModal;