feathered
v1.0.2
Published
A dynamic React icon component based on Feather Icons without dangerouslySetInnerHTML
Downloads
2
Readme
Feathered - Feather based react icons
This package is based on the feather-icons package by @colebemis to create Icon components without DangerouslySetInnerHTML.
npm install --save feathered
How to use Feathered
import React from 'react';
import Feather from 'feathered';
function CloseButton({ onClose }) {
return (
<button onClick={onClose}>
Close
<Feather icon='x' />
</button>
)
}
Feathered accepts the toSvg attributes as props for configuration:
<Feather
icon='feather' // The full list of icons can be found on [Feather](https://feathericons.com/)
color='#000'
size={24} // Size will automatically set both height & width since the icons are all square
height={24} // The icons are designed on a 24x24 grid but can be scaled to any size
width={24}
strokeWidth={2}
linecap='round'
linejoin='round'
/>