A dynamic React icon component based on Feather Icons without dangerouslySetInnerHTML
npm install featheredThis package is based on the feather-icons package by @colebemis to create Icon components without DangerouslySetInnerHTML.
``bash`
npm install --save feathered
`js
import React from 'react';
import Feather from 'feathered';
function CloseButton({ onClose }) {
return (
)
}
`
Feathered accepts the toSvg attributes as props for configuration:
`js``
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'
/>