@kaiko.io/rescript-heroicons-react

3.0.0-rc.1 • Public • Published

Kaiko's ReScript binding to @heroicons/react

This is a fork of Jazz's original work, it was updated to Heroicons 2 and Rescript 10/11 with JSX 4.

To avoid clashes with the old package, the namespace was changed to 'HeroIcons'.

Live gallery.

Version support

Version 2.x supports Rescript 10. Version 3.x supports Rescript 11.

Overview

With this binding, heroicons can be used as ReScript-React Components.

open HeroIcons

@react.component
let make = () => {
  <div>
    <Solid.PaperAirplaneIcon className="w-8 h-8" ariaHidden=true />
    <Outline.PaperAirplaneIcon className="w-8 h-8" ariaHidden=true/>
  </div>
}
(* w-8, h-8 are tailwind css classes.*)

Installation

yarn add @kaiko.io/rescript-heroicons-react
or
npm install @kaiko.io/rescript-heroicons-react

In bsconfig.json:

"bs-dependencies": ["@kaiko.io/rescript-heroicons-react"]

The binding has the following dependencies, and they have to be installed.

Development

  1. Update the dependencies, if needed, and install: yarn install.

  2. Update the script scripts/builder.js to adjust to new versions, etc.

  3. Generate the modules with npm run generate

  4. Run the test server npm run run and go to http://localhost:8000 to watch the live examples.

Original author

Nyi Nyi Than (Jazz)

License

MIT

Package Sidebar

Install

npm i @kaiko.io/rescript-heroicons-react

Weekly Downloads

0

Version

3.0.0-rc.1

License

MIT

Unpacked Size

3.26 MB

Total Files

88

Last publish

Collaborators

  • eddykaiko
  • mvaled