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

2.0.0 • 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}
/>;

Readme

Keywords

Package Sidebar

Install

npm i @figspec/react

Weekly Downloads

440,246

Version

2.0.0

License

MIT

Unpacked Size

6.69 kB

Total Files

5

Last publish

Collaborators

  • pocka