1.11.1 • Published 10 months ago

@versaprotocol/react v1.11.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Versa React Component Library

This package exports React components for displaying decrypted Versa receipts

Get Started

To install the package, run:

    npm i @versaprotocol/react

Usage

The best way to use the Versa React library is to plug your data into the ReceiptDisplay component. The merchant is a Versa Org object; likely the sender returned by the registry. The receipt is the decrypted payload received from the sender.

import { ReceiptDisplay, VersaContext } from "@versaprotocol/react";
import { receipts, senders } from "data";

export const Receipt = () => {
  return <ReceiptDisplay merchant={senders.bend} receipt={receipts.lodging} />;
};

If you want to take advantage of inline maps powered by Mapbox, you can provide a token via the Versa Context Provider

import { ReceiptDisplay, VersaContext } from "@versaprotocol/react";
import { receipts, senders } from "data";

export const Receipt = () => {
  return (
    <VersaContext.Provider value={{ mapbox_token: process.env.MAPBOX_TOKEN }}>
      <ReceiptDisplay merchant={senders.bend} receipt={receipts.lodging} />
    </VersaContext.Provider>
  );
};
1.11.0

10 months ago

1.11.1

10 months ago

1.10.0

11 months ago

1.9.0-alpha.0

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.9.6

1 year ago

1.9.5

1 year ago

1.9.4

1 year ago

1.9.3

1 year ago

1.9.2

1 year ago

1.8.8-alpha.0

1 year ago

1.8.7

1 year ago

1.8.2

1 year ago

1.8.6

1 year ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.6.2

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.4.1

1 year ago

1.3.2

1 year ago

1.4.0

1 year ago

1.2.0

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.3.1

1 year ago

1.2.2

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago