reamix
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

reamix

RemixIcon React Bindings

NPM JavaScript Style Guide

Install

npm install --save reamix

Usage

import React, { Component } from 'react'

import Icon from 'reamix'

class Example extends Component {
  render() {
    return (
      <Icon
        name='admin'
        size='lg'
        iconStyle='fill'
        color='red'
        useClass='my-custom-class'
        useStyle={{ margin: '20px' }}
      />
    )
  }
}
参数 说明 类型 可选值 默认值 required
name icon name IconName tldr - True
size icon buildin size IconSize lg / xl / xxs / xs / sm / 1x / 2x / 3x / 4x / 5x / 6x / 7x / 8x / 9x / 10x / fw - False
iconStyle icon style IconStyle fill / line - False
color icon color string <css color> - False
useClass custom css class string[] | string | undefined - - False
useStyle custom style Object | undefined - - False
ref Ref React.Ref<any,any> - - Fasle
component custom render Component React.ElementType - i False

For available IconName see https://remixicon.com/

Local development

Required

  • Nodejs >= 14
  • npm

Start Coding

  1. Read the create-react-library README
  2. Checkout the scripts/parse.css.js. This shoud be run with pre-hook of npm start. Use this script to parse remixicon.css and generate src/interface.ts
  3. Checkout src/index.tsx and make your awesome code

License

MIT © YoRolling

Readme

Keywords

none

Package Sidebar

Install

npm i reamix

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

46.5 kB

Total Files

10

Last publish

Collaborators

  • yorolling