Narnia Protect Me

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

    2.0.2 • Public • Published

    Truv React Bridge npm version

    React library for integrating with the Truv Bridge

    Install

    With npm:

    npm install @truv/react --save

    With yarn

    yarn add -S @truv/react

    Usage

    import ReactDOM from 'react-dom';
    import React, { useState } from 'react';
    import TruvBridge from '@truv/react';
    
    const BridgeElement = () => {
      const [isOpened, setOpened] = useState(false);
    
      return (
        <>
          <button onClick={() => setOpened(true)}>Open</button>
          <TruvBridge
            bridgeToken="<previously generated bridge token>" // more info https://docs.truv.com/reference/bridge-tokens_create
            onClose={() => setOpened(false)}
            onSuccess={(publicToken, metaData) => {
              setOpened(false);
              console.log(publicToken, metaData);
            }}
            isOpened={isOpened}
          />
        </>
      );
    }

    Install

    npm i @truv/react

    DownloadsWeekly Downloads

    60

    Version

    2.0.2

    License

    ISC

    Unpacked Size

    4.87 kB

    Total Files

    4

    Last publish

    Collaborators

    • sergnek
    • vesai_citadelid
    • dmitrydorofeev-citadel