Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pocka/figspec-react
React binding for Figspec web components
https://github.com/pocka/figspec-react
Last synced: 2 months ago
JSON representation
React binding for Figspec web components
- Host: GitHub
- URL: https://github.com/pocka/figspec-react
- Owner: pocka
- License: mit
- Created: 2022-06-07T15:42:18.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-06T07:49:37.000Z (over 1 year ago)
- Last Synced: 2024-05-02T00:01:33.452Z (8 months ago)
- Language: TypeScript
- Size: 1.65 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @figspec/react
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![npm](https://img.shields.io/npm/v/@figspec/react?label=%40figspec%2Freact)](https://www.npmjs.com/package/@figspec/react)A React binding for [`@figspec/components`](https://github.com/pocka/figspec).
## Installation
```sh
# 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 :camel::dash:```jsx
import { FigspecViewer } from "@figspec/react";const logSelectedNode = (ev) => {
console.log(ev.detail.selectedNode);
};;
```