@react-to-styled/icon
v0.3.1-alpha.2
Published
Toggle input
Downloads
8
Maintainers
Readme
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