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 2.x supports Rescript 10. Version 3.x supports Rescript 11.
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.*)
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.
-
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.
Nyi Nyi Than (Jazz)
- LinkedIn: @nyinyithann
- Twitter: @JazzTuyat
MIT