@credova/elements-react
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Credova React Elements

Version Downloads

A thin React wrapper for Credova JavaScript Elements SDK.

Installation

Using Node Package Manager

npm install --save @credova/elements-react

Using Yarn

yarn add @credova/elements-react

Documentation

For a complete list of options and examples, please refer to our React Elements SDK docs

Usage

Initialization

Initializing the SDK is done via calling the useCredova hook with parameters:

import {
  CredovaProvider,
  CardElement,
  useCredova,
} from '@credova/credova-react';

const App = () => {
  return (
    <CredovaProvider apiKey={apiKey}> // Publishable API Key
      <MyComponent />
    </CredovaProvider>
  );
};

const MyComponent = () => {
  const { credova } = useCredova();

  return <CardElement id="cardInput" />;
};

/@credova/elements-react/

    Package Sidebar

    Install

    npm i @credova/elements-react

    Weekly Downloads

    1

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    17.8 kB

    Total Files

    22

    Last publish

    Collaborators

    • rlfrahmpsq
    • bweber-psq