6
6
*/
7
7
import React from "react" ;
8
8
import PT from "prop-types" ;
9
- import Modal from "react-responsive-modal" ;
10
9
import Button from "components/Button" ;
11
- import IconCrossLight from "../../../../assets/images/icon-cross-light.svg" ;
12
10
import IconSingleManAdd from "../../../../assets/images/icon-single-man-add.svg" ;
13
- import "./styles.module.scss" ;
14
- import CenteredSpinner from "components/CenteredSpinner" ;
15
-
16
- const modalStyle = {
17
- borderRadius : "8px" ,
18
- padding : "32px 32px 22px 32px" ,
19
- maxWidth : "460px" ,
20
- width : "100%" ,
21
- margin : 0 ,
22
- "overflow-x" : "hidden" ,
23
- } ;
24
-
25
- const containerStyle = {
26
- padding : "10px" ,
27
- } ;
11
+ import BaseCreateModal from "../BaseCreateModal" ;
28
12
29
13
function AddAnotherModal ( {
30
14
open,
@@ -33,52 +17,38 @@ function AddAnotherModal({
33
17
submitDone,
34
18
addAnother,
35
19
} ) {
20
+ const buttons = (
21
+ < >
22
+ < Button
23
+ type = "secondary"
24
+ size = "medium"
25
+ disabled = { ! submitDone }
26
+ onClick = { addAnother }
27
+ >
28
+ Add Another Position
29
+ </ Button >
30
+ < Button
31
+ type = "primary"
32
+ size = "medium"
33
+ onClick = { onContinueClick }
34
+ disabled = { ! submitDone }
35
+ >
36
+ Continue
37
+ </ Button >
38
+ </ >
39
+ ) ;
40
+
36
41
return (
37
- < Modal
42
+ < BaseCreateModal
38
43
open = { open }
39
- center
40
44
onClose = { onClose }
41
- closeIcon = {
42
- < IconCrossLight height = "18px" width = "18px" styleName = "cross" />
43
- }
44
- styles = { {
45
- modal : modalStyle ,
46
- modalContainer : containerStyle ,
47
- } }
48
- >
49
- < div styleName = "modal-body" >
50
- { ! submitDone ? (
51
- < >
52
- < CenteredSpinner />
53
- < h5 > Submitting Request...</ h5 >
54
- </ >
55
- ) : (
56
- < >
57
- < IconSingleManAdd />
58
- < h5 > Add Another Position</ h5 >
59
- < p > You can add another position to your request if you want to.</ p >
60
- </ >
61
- ) }
62
- </ div >
63
- < div styleName = "button-group" >
64
- < Button
65
- type = "secondary"
66
- size = "medium"
67
- disabled = { ! submitDone }
68
- onClick = { addAnother }
69
- >
70
- Add Another Position
71
- </ Button >
72
- < Button
73
- type = "primary"
74
- size = "medium"
75
- onClick = { onContinueClick }
76
- disabled = { ! submitDone }
77
- >
78
- Continue
79
- </ Button >
80
- </ div >
81
- </ Modal >
45
+ headerIcon = { < IconSingleManAdd /> }
46
+ title = "Add Another Position"
47
+ subtitle = "You can add another position to your request if you want to."
48
+ buttons = { buttons }
49
+ isLoading = { ! submitDone }
50
+ maxWidth = "480px"
51
+ />
82
52
) ;
83
53
}
84
54
0 commit comments