@josemi-icons/react
v0.6.1
Published
An open source and hand-crafted SVG icons library
Downloads
32
Maintainers
Readme
Installation
Add this package to your project using yarn or npm:
$ yarn add react @josemi-icons/react
Usage
This package exports each icon individually as named exports, so you can import the icons that you really need for your project:
import React from "react";
import {CheckIcon} from "@josemi-icons/react";
export const App = () => (
<CheckIcon />
);
Customize icon using props
You can use the following props to customize the icon:
| Prop name | Description | Type | Default value |
|-----------|-------------|------|---------------|
| size
| The icon size. | String | "1em"
|
| color
| The icon color. | String | "currentColor"
|
| stroke
| The width of the stroke to be applied to the icon path. | String or Number | 2
|
Example:
import React from "react";
import {LineIcon} from "@josemi-icons/react";
export const App = () => (
<LineIcon color="#eaeaea" size="32px" />
);
Customize icons using CSS
You can use the color
and font-size
properties of CSS to customize the icon color and size:
import React from "react";
import {HomeIcon} from "@josemi-icons/react";
export const App = () => (
<span style={{color: "blue", fontSize: "32px"}}>
<HomeIcon />
</span>
);
License
Under the MIT LICENSE.