@si-components/preact
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@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}`} />
  </>
)

Package Sidebar

Install

npm i @si-components/preact

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

7.8 kB

Total Files

6

Last publish

Collaborators

  • sachinraja