1.0.2 • Published 4 years ago

fabric-checkbox-select v1.0.2

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

fabric-checkbox-select

Multiple select checkbox list component for Fabric (Fluent) UI

NPM JavaScript Style Guide

Install

npm install --save fabric-checkbox-select

or

yarn add fabric-checkbox-select

Usage

import React, { useState } from 'react'
import { CheckboxSelect, Option } from 'fabric-checkbox-select'

const options = [
  { label: 'Apple', value: 'apple' },
  { label: 'Orange', value: 'orange' }
]

const App = () => {
  const [value, setValue] = useState<Option[]>([])

  return (
    <CheckboxSelect
      value={value}
      onChange={(value) => setValue(value)}
      options={options}
      label='Fruits'
      oneSelectedLabel='One selected'
      mulitpleSelectedLabel={`${value.length} fruits selected`}
    />
  )
}

export default App

License

MIT © dusanjovanov

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago