npm

@fortawesome/fa-icon-chooser-react
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

FaIconChooser React Component

Find API References for the required callback functions in the fa-icon-chooser component documentation over here.

Usage

npm install --save @fortawesome/fa-icon-chooser-react
import ReactDOM from 'react-dom'
import { FaIconChooser } from '@fortawesome/fa-icon-chooser-react'

// One or both of these would be provided somehow by the user.
// If both are provided as propse, kitToken takes priority over version.
// If only version is present, the Icon Chooser will run with only
// Font Awesome Free with the given version.
const version = '5.15.5'
const kitToken = undefined

// Implement the required callback functions.

function handleQuery() {
  // ...
}

function handleResult() {
  // ...
}

function getUrlText() {
  // ...
}

const chooser = <FaIconChooser
  version={ version }
  kitToken={ kitToken }
  handleQuery={ handleQuery }
  getUrlText={ getUrlText }
  onFinish={ handleResult }
></FaIconChooser>

ReactDOM.render(chooser, document.body)

See also the example React app.

Readme

Keywords

none

Package Sidebar

Install

npm i @fortawesome/fa-icon-chooser-react

Weekly Downloads

212

Version

0.7.0

License

MIT

Unpacked Size

35.9 kB

Total Files

33

Last publish

Collaborators

  • jasonlundien
  • devoto13
  • jrjohnson
  • robmadole
  • supercodepoet
  • fortawesome-admin
  • mwilkerson