Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ourpay/donation

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ourpay/donation

JS/React library for MFE Demo widgets

  • 0.0.20
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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 @ourpay/donation) or import from CDN: https://www.unpkg.com/@ourpay/donation

NOTE: If you want to inject the bundle straight into the browser via script tags, make sure to import the browser bundle: https://www.unpkg.com/@ourpay/donation/dist/browser.js as it has all the React dependencies included

React
import {
    DonationForm,
    DonationTable,
    DonationProvider,
} from "@ourpay/donation";

export default function App() {
    return (
        <DonationProvider
            appId={123}
            backgroundColor="#758BFD"
            primaryTextColor="#F1F2F6"
        >
            <DonationForm defaultAmount={5} />
            <DonationTable title="Donation Table" />
        </DonationProvider>
    );
}
JS

Example:

// Initialize JS factory
const elements = OurpayDonation.Elements({
    appId: 123,
    backgroundColor: "#fff",
    primaryTextColor: "#000",
}); // uses OurpayDonation global variable
elements.DonationForm.mount("#form-id", {
    defaultAmount: 100,
});
elements.DonationTable.mount("#table-id", {
    title: "Donation Table",
});

FAQs

Package last updated on 02 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc