Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dist/index.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ var FlutterWaveButton = function (_a) {
* function to be called when you want to close payment
*/
function closePaymentModal() {
document.getElementsByName('checkout')[0].setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
document.body.style.overflow = '';
document.getElementsByName('checkout').forEach(function (item) {
item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
document.body.style.overflow = '';
});
}

export { FlutterWaveButton, types as FlutterWaveTypes, closePaymentModal, useFlutterwave };
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ var FlutterWaveButton = function (_a) {
* function to be called when you want to close payment
*/
function closePaymentModal() {
document.getElementsByName('checkout')[0].setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
document.body.style.overflow = '';
document.getElementsByName('checkout').forEach(function (item) {
item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
document.body.style.overflow = '';
});
}

exports.FlutterWaveButton = FlutterWaveButton;
Expand Down
19,580 changes: 11,818 additions & 7,762 deletions example/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1"
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion example/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function App() {

const fwConfig = {
...config,
text: 'Pay with Flutterwave!',
text: 'Pay with Flutterwave btn',
callback: (response) => {
console.log(response);
closePaymentModal()
Expand Down
6 changes: 4 additions & 2 deletions example/src/dist/index.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ var FlutterWaveButton = function (_a) {
* function to be called when you want to close payment
*/
function closePaymentModal() {
document.getElementsByName('checkout')[0].setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
document.body.style.overflow = '';
document.getElementsByName('checkout').forEach(function (item) {
item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
document.body.style.overflow = '';
});
}

export { FlutterWaveButton, types as FlutterWaveTypes, closePaymentModal, useFlutterwave };
6 changes: 4 additions & 2 deletions example/src/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,10 @@ var FlutterWaveButton = function (_a) {
* function to be called when you want to close payment
*/
function closePaymentModal() {
document.getElementsByName('checkout')[0].setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
document.body.style.overflow = '';
document.getElementsByName('checkout').forEach(function (item) {
item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
document.body.style.overflow = '';
});
}

exports.FlutterWaveButton = FlutterWaveButton;
Expand Down
Loading