@kaiko.io/rescript-heroicons-react
v3.0.0-rc.1
Published
Unofficial ReScript binding to @heroicons/react
Downloads
2
Readme
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'.
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
Update the dependencies, if needed, and install:
yarn install
.Update the script
scripts/builder.js
to adjust to new versions, etc.Generate the modules with
npm run generate
Run the test server
npm run run
and go to http://localhost:8000 to watch the live examples.
Original author
Nyi Nyi Than (Jazz)
- LinkedIn: @nyinyithann
- Twitter: @JazzTuyat
License
MIT