0.1.5 • Published 6 years ago

canopy-react-buttongroup v0.1.5

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

canopy-react-buttongroup

A Bootstrap button group for AppStateESS/Canopy using React. Expects Bootstrap 4.

const buttons = [
  {
    value: '1',
    label: <span>
        <i className="fas fa-user"></i>&nbsp; Person</span>
  }, {
    value: '2',
    label: <span>
        <i className="fas fa-users"></i>&nbsp; People</span>
  }
]

const matchingValue = '1' // Person

const setPersonAmount(val) {
  this.setState({persons : val})
}

const activeColor = 'success' // Bootstrap primary colors only

return (
<ButtonGroup
  name="input_name"
  buttons={buttons}
  match={matchingValue}
  handle={setPersonAmount}
  vertical={false}
  activeColor={activeColor}/>
)
0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.0

6 years ago