0.0.12 • Published 1 year ago

ourpayelements v0.0.12

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

ourpayelements

JS/React library for MFE Demo widgets

Development

  • Clone repository
  • Install dependencies
cd mfe-demo-widget
npm install
  • Start development bundler
npm run dev
  • Start example web app
cd example/react OR cd example/js
npm i
npm run dev

Usage

Install as an NPM package (npm i ourpayelements) or import from CDN: https://www.unpkg.com/ourpayelements

React

import { DonationForm, DonationTable, DonationProvider } from "ourpayelements";

export default function App() {
    return (
        <DonationProvider appId={123}>
            <DonationForm />
            <DonationTable />
        </DonationProvider>
    );
}

JS

Example:

// Initialize JS factory
const elements = Ourpay.Elements(123);
elements.DonationForm.mount("#form-id", {
    defaultAmount: 100,
});
elements.DonationTable.mount("#table-id");
0.0.12

1 year ago

0.0.11

1 year ago

0.0.7

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago