-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoadingModal.tsx
More file actions
44 lines (40 loc) · 862 Bytes
/
LoadingModal.tsx
File metadata and controls
44 lines (40 loc) · 862 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
import React from 'react';
import styled from 'styled-components';
import Card from '../ui/Card';
const Modal = styled.div`
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.4);
`;
const ModalCardArea = styled.div`
width: 100%;
max-width: 800px;
margin: 200px auto;
`;
function LoadingModal({
message,
pullRequestURL,
}: {
message: string;
pullRequestURL: string | null;
}) {
return (
<Modal>
<ModalCardArea>
<Card>
<h2>{pullRequestURL == null ? 'Loading...' : 'Congratulations'}</h2>
<p>{message}</p>
{pullRequestURL != null && (
<p>
<a href={pullRequestURL}>Go to newly generated pull request</a>
</p>
)}
</Card>
</ModalCardArea>
</Modal>
);
}
export default LoadingModal;