react-multi-toogle
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

react-multi-toogle

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save react-multi-toogle

or

yarn add react-multi-toogle

Usage

import React from 'react'
import { ReactMultiToogle } from 'react-multi-toogle'
import {
  faSun,
  faMoon,
  faAd,
  faAnchor
} from '@fortawesome/free-solid-svg-icons'

const App = () => {
  return <ReactMultiToogle
    name="testToogle"
    onClick={(state) => {
      console.log(state)
    }}
    options={[
      {
        icon: faSun,
        value: "state1"
      },
      {
        value: "state2",
        icon: faMoon,
      },
      {
        icon: faAd,
        value: "state3"
      },
      {
        icon: faAnchor,
        value: "state4"
      },
    ]}/>
}

export default App

License

MIT © jimx6

Readme

Keywords

none

Package Sidebar

Install

npm i react-multi-toogle

Weekly Downloads

0

Version

1.0.10

License

MIT

Unpacked Size

31.5 kB

Total Files

12

Last publish

Collaborators

  • jimx6