1.0.5 • Published 3 years ago

react-iconfonts v1.0.5

Weekly downloads
27
License
MIT
Repository
github
Last release
3 years ago

react-iconfonts

A Project For React To Use Iconfont Intelligently

Installation

$ npm i -S react-iconfonts
import IconFont from 'react-iconfonts'

Iconfont

Upload your icons(SVG) to your icon project you have created and download it from Iconfont, unzip download.zip.

FontClass

Add iconfont.css to your project

// Import css
import './iconfont.css'

Symbol, Svg

Add iconfont.js to your project

// import js
import './iconfont.js'

Warning: If there is something wrong with iconfont.js because of Eslint, add this comment to the first line of iconfont.js: // eslint-disable-next-line no-unused-expressions

Usage

import React from 'react'
import IconFont from 'react-iconfonts'

// import for IconFont usage
import './iconfont.css'
import './iconfont.js'

class App extends React.Component {
  render() {
    return (
      <div>
        <div>
          Hello
          <IconFont
            type='icon'
            name='circle-checked'
            color='f00'
            size='30'
          />
          FontIcon
        </div>

        <div>
          Hello
          <IconFont
            type='svg'
            name='circle-checked'
            color='f00'
            size='30'
          />
          SvgIcon
        </div>
      </div>
    )
  }
}

export default App
1.0.5

3 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago