0.8.0 • Published 3 years ago

@amoutonbrady/solid-heroicons v0.8.0

Weekly downloads
17
License
MIT
Repository
github
Last release
3 years ago

Solid Heroicons

Heroicons intergration for solid-js.

Demo

Installation

$ npm install @amoutonbrady/solid-heroicons
$ yarn add @amoutonbrady/solid-heroicons
$ pnpm add @amoutonbrady/solid-heroicons

Usage

You can import every icon from heroicons solid or outline from @amoutonbrady/solid-heroicons/solid and @amoutonbrady/solid-heroicons/outline respectively. They are exported as camel case. Everything exported from those packages are just an object with the SVG path and a metadata to know whether it's been exported from solid or outline. Those packages are generated automatically from the heroicon repo.

You can import the Icon component helper from @amoutonbrady/solid-heroicons. This is just a SVGElement wrapper that accepts any props a regular SVG would plus a special props path for the icon you want to load in.

By default the stroke | fill attribute of the SVG is set to currentColor which means you can give any color you want to the SVG by setting the css color attribute on SVG or any parent higher.

import { render } from 'solid-js/dom'
import { Icon } from '@amoutonbrady/solid-heroicons';
import { arrowLeft } from '@amoutonbrady/solid-heroicons/solid';
import { arrowRight } from '@amoutonbrady/solid-heroicons/outline';

const App = () => <>
    <Icon path={arrowLeft} />
    <Icon path={arrowRight} />
</>

render(() => App, document.getElementById('app'))

Troubleshoot

0.9.0-rc.0

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.3.1

3 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago