1.0.0 • Published 4 years ago

reamix v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

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
nameicon nameIconNametldr-True
sizeicon buildin sizeIconSizelg / xl / xxs / xs / sm / 1x / 2x / 3x / 4x / 5x / 6x / 7x / 8x / 9x / 10x / fw-False
iconStyleicon styleIconStylefill / line-False
coloricon colorstring\<css color>-False
useClasscustom css classstring[] | string | undefined--False
useStylecustom styleObject | undefined--False
refRefReact.Ref<any,any>--Fasle
componentcustom render ComponentReact.ElementType-iFalse

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