Skip to content

charan379/react-svg-icons

Repository files navigation

react-svg-icons

This is a component library package for react based applications.

Preview icons before you use them in your application at: Storybook

Installation

This project is currenlty published at NPM with package name @charan379/react-svg-icons, so you can install it from NPM repository.

npm install @charan379/react-svg-icons

Usage

To import all Icon components.

import * from "@charan379/react-svg-icons"

To import specific icons.

import { <ICON_COMPONENT_NAME1> ,<ICON_COMPONENT_NAME2> } from "@charan379/react-svg-icons"

Example

import { WhatsappSvg ,EmailSvg } from "@charan379/react-svg-icons"

To render icon:

<ICON_COMPONENT_NAME 
    iconProp1 = {"value"}
    iconProp2 = {"value"}
/>

Example

<WhatsappSvg
  aroundHandsetColor="#40c351"
  handsetColor="#fff"
  innerBorderColor="#fff"
  outerBorderColor="#cfd8dc"
  size={55}
/>

Example React Code

import React from 'react'
import { WhatsappSvg } from "@charan379/react-svg-icons";

const Home = () => {
  return (
    <>
      <div>
        {/* Link to whatsapp */}
        <a href='https://link-to-whatsapp' target='_blank'>
          {/* Render Whatsapp Icon */}
          <WhatsappSvg
            aroundHandsetColor="#40c351"
            handsetColor="#fff"
            innerBorderColor="#fff"
            outerBorderColor="#cfd8dc"
            size={55}
          />
        </a>
      </div>
    </>
  )
}

export default Home;

Storybook

Test / Play with icons before you use them in your application at: Storybook

Authors

License

AGPL License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published