File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed
Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1414 - name : Use Node.js
1515 uses : actions/setup-node@v1
1616 with :
17- node-version : 14.17.6
17+ node-version : 16. 14.0
1818 - name : install
1919 run : npm install
2020 - name : yarn
Original file line number Diff line number Diff line change 66 runs-on : ubuntu-20.04
77 steps :
88 - uses : actions/checkout@v2
9- - name : Use Node.js 14.17.6
9+ - name : Use Node.js 16. 14.0
1010 uses : actions/setup-node@v1
1111 with :
12- node-version : 14.17.6
12+ node-version : 16. 14.0
1313 - name : install
1414 run : npm install
1515 - name : yarn
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ const Modal: React.FC<{
6262 confirmText ?: string ;
6363 onConfirm ?: ( ) => void | Promise < void > | boolean | Promise < boolean > ;
6464 onCancel ?: ( ) => void | boolean ;
65+ cancelText ?: string ;
6566 disabled ?: boolean ;
6667 hideCloseIcon ?: boolean ;
6768 hideFooter ?: boolean ;
@@ -71,6 +72,7 @@ const Modal: React.FC<{
7172 setIsOpen,
7273 children,
7374 confirmText = "Submit" ,
75+ cancelText = "Cancel" ,
7476 onConfirm,
7577 onCancel,
7678 disabled = false ,
@@ -145,13 +147,15 @@ const Modal: React.FC<{
145147 < ModalFooter >
146148 { error && < ErrorMessage > { error } </ ErrorMessage > }
147149 { loading && < Loading > Loading...</ Loading > }
148- < Button
149- onClick = { onCancelClick }
150- type = "secondary"
151- disabled = { loading }
152- >
153- Cancel
154- </ Button >
150+ { cancelText && (
151+ < Button
152+ onClick = { onCancelClick }
153+ type = "secondary"
154+ disabled = { loading }
155+ >
156+ { cancelText }
157+ </ Button >
158+ ) }
155159 < ConfirmButton
156160 onClick = { onConfirmClick }
157161 type = "primary"
You can’t perform that action at this time.
0 commit comments