@davide-angelillo/react-component-library
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

React Component Library

Usage

npm install @fabrick/react-component-library --save
// MyComponent.tsx
import {FbkElement} from "@fabrick/react-component-library";
//...
return <FbkElement foo={foo} bar="bar"/>

Development

In order to make design-system web-components work with React, you must create its React wrapper in the this library by creating a new .ts file that looks like this:

import {FbkComponentName as FbkComponentClass} from '../../../component-library/src/components/fbk-component'

export const FbkComponentName = createComponent({ // should be the same of the element class
  tagName: 'fbk-element-tag-name',
  elementClass: FbkComponentClass,
  react: React,
  events: {
    onCountClick: 'on-count-click' // remapping events in camelCase
  }
});

Publishing

Please read the project's root README.md

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @davide-angelillo/react-component-library

      Weekly Downloads

      0

      Version

      0.1.1

      License

      ISC

      Unpacked Size

      134 kB

      Total Files

      21

      Last publish

      Collaborators

      • davide-angelillo