1.15.0 • Published 2 years ago

@s-ui/react-tag-selectable-list v1.15.0

Weekly downloads
22
License
MIT
Repository
-
Last release
2 years ago

TagSelectableList

@s-ui/react-tag-selectableList

A React component that show a selectable tag list with optional button "all" for select or unselect all items

Installation

npm install @s-ui/react-tag-selectableList --save

Usage

import TagSelectableList from '@s-ui/react-tag-selectableList'
const tags = [
  {
    label: 'accusantium',
    value: 1
  },
  {
    label: 'et quibusdam',
    value: 2
  }
]

function onChange (values) {
  console.log('onChange', values)
}

const checkIcon = ({ svgClass }) => <svg className={svgClass} viewBox='0 0 64 64'><path d='M21.92,54.91,2.51,33.34a2,2,0,0,1,3-2.68L22.08,49.09,58.59,12.59a2,2,0,0,1,2.83,2.83Z' /></svg>

<TagSelectableList tagsList={tags} onChange={onChange} all="All options" checkIcon={checkIcon} />
  • if parameter "All" is defined, `then show these button

1.15.0

2 years ago

1.14.0

2 years ago

1.13.0

3 years ago

1.12.0

4 years ago

1.11.0

4 years ago