@mycujoo/mcls-components-checkout
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc.13 • Public • Published

MCLS Checkout component

The is a configurable react component that is to be used for rendering a checkout card for MCLS orders.

CheckoutWithContext

The CheckoutWithContext component is a wrapper around the Checkout component that handles the state creation and management for a single order.

Example of usage:

import { CheckoutWithContext } from '@mycujoo/mcls-components-checkout'

const Checkout = () => {

    return <CheckoutWithContext 
      publicKey={"YOUR_PUBLIC_KEY"} 
      identityToken={"YOUR_USER_IDENTITY_TOKEN"} 
      orderId={"YOUR_ORDER_ID"}
      config={{
        width: '100%',
        height: '100%',
        showPromoCode: true,
        title: {
          color: `#0FF`,
        },
        header: {
          hide: true,
        },
      }}
    />
}

Note: The orderId is received from the createOrder function of the useEventPackagesList hook, or by using useOrderCreate hook inside the EventPackagesContextProvider component.

Readme

Keywords

none

Package Sidebar

Install

npm i @mycujoo/mcls-components-checkout

Weekly Downloads

3

Version

1.0.0-rc.13

License

MIT

Unpacked Size

1.62 MB

Total Files

289

Last publish

Collaborators

  • adamahom
  • yneleven
  • berker93
  • vikkivi
  • pvmnt
  • farzad-mycujoo
  • mycujoo.tv
  • radev83
  • aandrei
  • pplaatje
  • oleksiih
  • antonella.manilla
  • thecodeassassin
  • rgalus
  • mycujoomats
  • alaandrei