@ridi/web-icons
TypeScript icon, indicating that this package has built-in type declarations

0.7.1 • Public • Published

@ridi/web-icons

Install

$ npm install @ridi/web-icons

Usage

With url-loader:

import { Arrow } from '@ridi/web-icons';

<img src={Arrow} />

With SVGR:

import { Arrow } from '@ridi/web-icons';

<Arrow />

Icons

import icons from '@ridi/web-icons';
import { version } from '@ridi/web-icons/package.json';
import { snakeCase } from 'lodash';

<div
  style={{
    display: 'flex',
    flexFlow: 'row wrap',
    justifyContent: 'space-between',
  }}
>
  {Object.keys(icons).map((name, index, array) => {
    const Icon = icons[name];

    return (
      <div
        key={name}
        style={{
          flex: index === array.length - 1 && 1,
          margin: '10px',
        }}
      >
        <div
          style={{
            display: 'inline-block',
            color: 'black',
            textAlign: 'center',
            textDecoration: 'none',
          }}
        >
          <a
            href={`https://cdn.jsdelivr.net/npm/@ridi/web-icons@${version}/svgs/${snakeCase(name)}.svg`}
            target="_blank"
          >
            <Icon width="48" height="48" />
          </a>
          <div style={{ fontSize: '12px', userSelect: 'all' }}>{name}</div>
        </div>
      </div>
    );
  })}
</div>;

/@ridi/web-icons/

    Package Sidebar

    Install

    npm i @ridi/web-icons

    Weekly Downloads

    0

    Version

    0.7.1

    License

    MIT

    Unpacked Size

    15.7 kB

    Total Files

    39

    Last publish

    Collaborators

    • davin.ahn
    • ridicorp
    • ridi-junhee
    • mando212
    • hw.choi
    • simulacre7
    • lowfront
    • ys.yoon