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

2.0.1 • Public • Published

@figspec/react

code style: prettier npm

A React binding for @figspec/components.

Installation

# npm
$ npm i @figspec/react

# Yarn
$ yarn add @figspec/react

# pnpm
$ pnpm add @figspec/react

Usage

See the docs at @figspec/components.

This bindings enables you to use the CustomElement's property via React's component props. You don't need to use kebab-case attributes 🐫💨

import { FigspecViewer } from "@figspec/react";

const logSelectedNode = (ev) => {
  console.log(ev.detail.selectedNode);
};

<FigspecFrameViewer
  nodes={nodes}
  renderedImage={renderedImage}
  zoomMargin={200}
  onNodeSelect={logSelectedNode}
/>;

/@figspec/react/

    Package Sidebar

    Install

    npm i @figspec/react

    Weekly Downloads

    718,697

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    6.71 kB

    Total Files

    5

    Last publish

    Collaborators

    • pockawoooh