@josemi-icons/react

0.6.1 • Public • Published

@josemi-icons/react

npm version license

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.

Package Sidebar

Install

npm i @josemi-icons/react

Weekly Downloads

15

Version

0.6.1

License

MIT

Unpacked Size

670 kB

Total Files

6

Last publish

Collaborators

  • jmjuanes