auto-ikons

0.1.375 • Public • Published

auto-ikons

prototype - collection of SVG icon components for React

NPM JavaScript Style Guide

Install

npm install --save auto-ikons

Usage

the only export is an object called AutoIcons:

import React, { Component } from 'react'
import { AutoIcons } from 'auto-ikons'

const keys = Object.keys(AutoIcons)

export default class App extends Component {
  render() {
    return (
      <div
        style={{
          margin: 40,
        }}
      >
        <h1>Modern React component module</h1>
        <hr />
        {keys.map((key, index) => {
          const Icon = AutoIcons[key]
          return (
            <div
              key={`icon-${index}`}
              style={{
                height: 48,
                display: 'flex',
                flexDirection: 'row',
                alignItems: 'center',
              }}
            >
              <Icon style={{ width: 24, height: 24 }} />
              <span style={{ marginLeft: 20 }}>{key}</span>
            </div>
          )
        })}
      </div>
    )
  }
}

License

MIT © eswat2

Dependents (0)

Package Sidebar

Install

npm i auto-ikons

Weekly Downloads

2

Version

0.1.375

License

MIT

Unpacked Size

839 kB

Total Files

11

Last publish

Collaborators

  • eswat2