@smashing/control-group
v1.0.8
Published
Set of two or more buttons/radios/checkboxes with controlled value.
Downloads
15
Readme
yarn add @smashing/control-group
Default usage
const ReactComponent = () => {
const [value, setValue] = React.useState(1)
return (
<ControlGroup
controlAppearance="flat"
groupAppearance="button"
onChange={v => setValue(v)}
value={value}
items={[
{
label: 'first button',
value: 1
},
{
label: 'second button',
value: 2
}
]}
/>
)
}