0.3.1-alpha.2 • Published 2 years ago

@react-to-styled/icon v0.3.1-alpha.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

License: MIT GitHub contributors npm npm First good issue Package size

React to styled icon

We are using react-inlinesvg library for our icon component.

Installation

We suggest this package to be imported

Install with npm:

npm install @react-to-styled/icon

Install with yarn:

yarn add @react-to-styled/icon

Import

import { Icon, IconProps, IconNames } from '@react-to-styled/icon'

Dependencies

All our components depend on these dependencies

{
  "peerDependencies": {
    "react": ">=16.8.0",
    "react-dom": ">=16.8.0",
    "styled-components": ">=5"
  }
}

Usage

Here is a quick example how to add Icon:

import React, { useState } from 'react'
import ReactDOM from 'react-dom'
import { Icon } from '@react-to-styled/icon'

function App() {
  return <Icon name="arrow-down" />
}

ReactDOM.render(<App />, document.querySelector('#app'))

You can also check our storybook for more examples