UNPKG

react-klasha

Version:

This is an reactJS library for implementing klasha payment gateway

24 lines (23 loc) 576 B
export const setupConfig = (config) => { const win = window; const Ionic = win.Ionic; if (Ionic && Ionic.config && Ionic.config.constructor.name !== 'Object') { return; } win.Ionic = win.Ionic || {}; win.Ionic.config = Object.assign(Object.assign({}, win.Ionic.config), config); return win.Ionic.config; }; export const getMode = () => { const win = window; const config = win && win.Ionic && win.Ionic.config; if (config) { if (config.mode) { return config.mode; } else { return config.get('mode'); } } return 'md'; };