Skip to content

v2.0.0

Choose a tag to compare

@cheton cheton released this 22 Dec 07:51
· 29 commits to master since this release

Refactors RadioButton component that attaches text label next to the radio button

Usage

<RadioButton label="RadioButton label" />

The label prop is optional, you can use children to pass through the component.

<RadioButton label="RadioButton label">
    <p style={{ marginLeft: 24 }}>
        Lorem ipsum dolor sit amet...
    </p>
</RadioButton>

<RadioButton>
    <span style={{ verticalAlign: 'middle', marginLeft: 8 }}>
        Lorem ipsum dolor sit amet...
    </span>
</RadioButton>

Uncontrolled RadioButton

// Default checked
<RadioButton defaultChecked />

Controlled RadioButton

// Checked
<RadioButton checked />