1.1.2 • Published 4 years ago

react-mono-js v1.1.2

Weekly downloads
19
License
MIT
Repository
github
Last release
4 years ago

Mono for React

This is a React Package that helps you integrate Mono - https://withmono.com/ easily

Install

npm install --save react-mono-js
# or
yarn add react-mono-js

Usage

import React from 'react';
import { MonoButton, useMono } from 'react-mono-js';

export default function App() {
  const config = {
    public_key: 'YOUR_CONNECT_PUBLIC_KEY',
    onClose: () => {},
    onSuccess: (response) => {
      console.log(response.code);

      /**
        response : { "code": "code_xyz" }
        you can send this code back to your server to get this
        authenticated account and start making requests.
      */
    },
  };

  const handleMono = useMono({ public_key: 'YOUR_CONNECT_PUBLIC_KEY' });

  return (
    <div className="App">
      <h1>React Wrapper for Mono enrollments</h1>
      <h2>Check it out!</h2>

      <button
        onClick={() =>
          handleMono({
            onClose: () => null,
            onSuccess: (response) => {
              console.log(response.code);
            },
          })
        }
      >
        Connect bank with Mono
      </button>

      <MonoButton {...config} text="Connect bank with Mono!" />
    </div>
  );
}

Please checkout Mono Documentation for more explanation

Follow on Twitter @somtougeh

License

This project is licensed under the MIT License - see the LICENSE.md file for details

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago