@si-components/preact
Preact component for simple-icons
Installation
npm install @si-components/preact simple-icons
simple-icons
must be installed as a peer dependency.
Usage
import SIIcon from '@si-components/preact'
// import icon from simple-icons
import { siReact } from 'simple-icons/icons'
const Component = () => (
<>
{/* pass icon into component */}
<SIIcon icon={siReact} />
{/* extra attributes are passed to svg */}
<SIIcon icon={siReact} width="100" height="100" color={`#${siReact.hex}`} />
</>
)