0.6.0 • Published 10 months ago

@fortawesome/fa-icon-chooser-react v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

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.

0.6.0

10 months ago

0.5.0

1 year ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.3.0-rc1

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.6

3 years ago