Skip to content

Commit 2b70499

Browse files
committed
Readme file updated
1 parent da4cfc7 commit 2b70499

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $ yarn add flutterwave-react-v3
5050

5151
```javascript
5252
import React from 'react';
53-
import { useFlutterwave } from 'flutterwave-react-v3';
53+
import { useFlutterwave, closePaymentModal } from 'flutterwave-react-v3';
5454

5555
export default function App() {
5656
const config = {
@@ -81,7 +81,8 @@ export default function App() {
8181
onClick={() => {
8282
handleFlutterPayment({
8383
callback: (response) => {
84-
console.log(response);
84+
console.log(response);
85+
closePaymentModal() // this will close the modal programmatically
8586
},
8687
onClose: () => {},
8788
});
@@ -99,7 +100,7 @@ export default function App() {
99100

100101
```javascript
101102
import React from 'react';
102-
import { FlutterWaveButton } from 'flutterwave-react-v3';
103+
import { FlutterWaveButton, closePaymentModal } from 'flutterwave-react-v3';
103104

104105
export default function App() {
105106
const config = {
@@ -124,7 +125,8 @@ export default function App() {
124125
...config,
125126
text: 'Pay with Flutterwave!',
126127
callback: (response) => {
127-
console.log(response);
128+
console.log(response);
129+
closePaymentModal() // this will close the modal programmatically
128130
},
129131
onClose: () => {},
130132
};

0 commit comments

Comments
 (0)