1.0.2 • Published 4 years ago
fabric-checkbox-select v1.0.2
fabric-checkbox-select
Multiple select checkbox list component for Fabric (Fluent) UI
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