RadioGroup
Usage
import { Component } from 'react'
import { Radio, RadioGroup } from '@aragon/ui'
const RADIO_LABELS = ['First', 'Second', 'Third']
class App extends Component {
state = {
activeId: 'first',
}
handleChange = activeId => {
this.setState({ activeId })
}
render() {
const { activeId } = this.state
return (
<RadioGroup onChange={this.handleChange} selected={activeId}>
{RADIO_LABELS.map((label, i) => {
const radioId = label.toLowerCase()
return (
<label key={i}>
<Radio id={radioId} />
{label}
</label>
)
})}
</RadioGroup>
)
}
}Demonstration

Props
className
classNameselected
selectedonChange
onChangeArguments:
children
childrenLast updated
Was this helpful?
