frontend for offline-pay-with-crypto
npm install @chimoney/offline-pay-with-crypto-widgetoffline-pay-with-crypto-widget> TODO: description
1. Wrap the root of your application with the ModalProvider provided by @chimoney/offline-pay-with-crypto-widget
``jsx
import { ModalProvider } from '@chimoney/offline-pay-with-crypto-widget';
ReactDOM.render(
document.getElementById('root')
);
`
2. To make use of the components
`jsx
import { ModalOverlay, Modal, ModalContainer, useModal } from '@chimoney/offline-pay-with-crypto-widget';
export default function DemoModal() {
const { isOpen, toggleModal } = useModal();
const config = {
name: 'Chimoney app',
store_img:
'https://lh3.googleusercontent.com/-crMj-_7sKco/AAAAAAAAAAI/AAAAAAAAAAA/8wRiFKrmpe8/s88-p-k-no-ns-nd/photo.jpg',
paymentDescription: 'Send a payment to chimoney.io',
supportedCurrencies: {
'CELO': {
code: 'CELO',
walletAddress: '0x3........', // change to celo wallet address here
amount: 1,
},
'CUSD': {
code: 'cUSD',
walletAddress: '0x3........',
amount: 1,
},
},
}
return (
<>
{
isOpen &&
}
>
)
}
`
packages`
npm link ../offline-pay-with-crypto-landing-page/node_modules/react
npm link ../offline-pay-with-crypto-landing-page/node_modules/react-dom
`Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (
git checkout -b feature/AmazingFeature)
3. Commit your Changes (git commit -m 'Add some AmazingFeature')
4. Push to the Branch (git push origin feature/AmazingFeature)
5. Open a Pull RequestLicense
Distributed under the MIT License. See
LICENSE.md` for more information.- Uchi Uchibeke - @uchiuchibeke - uchi.uchibeke@gmail.com
- Bayo
- Lawal
Project Link: https://github.com/Chimoney/offline-pay-with-crypto