Skip to content

Releases: trendmicro-frontend/react-radio

v4.0.0-alpha

24 Dec 11:37
Compare
Choose a tag to compare
v4.0.0-alpha Pre-release
Pre-release
Refresh dist files and docs

v3.2.2

25 Sep 03:20
7159f3e
Compare
Choose a tag to compare
  • Fixed radio inside would not fit with outside under some resolution (f38584d)
  • Use react-styleguidist to create demo page (9eb896d, 7159f3e)

v3.2.1

10 Aug 10:17
Compare
Choose a tag to compare

Address an issue where checking element type for imported components is not possible with projects using react-hot-loader (aa937b6)

v3.2.0

14 Feb 03:24
Compare
Choose a tag to compare

Add a "depth" prop to limit the recursion depth when rendering radio buttons deeply inside a radio group (6750fe8)

Example

<RadioGroup
    name="comic"
    value={this.state.value}
    depth={3} // This is needed to minimize the recursion overhead
    onChange={(value, event) => {
        this.setState({ value: value });
    }}
>
    <div className="row">
        <div className="col-xs-12 col-sm-6">
            <RadioButton label="Batman (DC)" value="dc:batman" />
            <RadioButton label="Hulk (Marvel)" value="marvel:hulk" />
        </div>
        <div className="col-xs-12 col-sm-6">
            <RadioButton label="Superman (DC)" value="dc:superman" />
            <RadioButton label="Spider-Man (Marvel)" value="marvel:spiderman" disabled />
        </div>
    </div>
</RadioGroup>

v3.1.3

13 Feb 11:51
Compare
Choose a tag to compare

Use "pointer-events: none" for the control indicator (b5be336)

v3.1.2

13 Feb 11:27
Compare
Choose a tag to compare

RadioGroup can be an uncontrolled component when not passing the "value" prop (7f8ef2d)

v3.1.1

13 Feb 10:50
Compare
Choose a tag to compare

Fixed an bug where RadioButton's onChange() will not be called when wrapping with RadioGroup (3a702b7)

v3.1.0

23 Jan 07:24
Compare
Choose a tag to compare
  • Fixed an issue where the render function will always map object to array (eec9254)
  • Removed className and style props from RadioGroup since it will no longer wrap children with a <div/> element.

v3.0.0

28 Dec 08:40
Compare
Choose a tag to compare

Breaking

  • Renamed react-radio-button to react-radio

What's New

  • Adds RadioGroup component
<RadioGroup
    name="comic"
    value={this.state.value}
    onChange={(value, event) => {
        this.setState({ value: value });
    }}
>
    <div className="row">
        <div className="col-xs-12 col-sm-6">
            <RadioButton label="Batman (DC)" value="dc:batman" />
            <RadioButton label="Hulk (Marvel)" value="marvel:hulk" />
        </div>
        <div className="col-xs-12 col-sm-6">
            <RadioButton label="Superman (DC)" value="dc:superman" />
            <RadioButton label="Spider-Man (Marvel)" value="marvel:spiderman" disabled />
        </div>
    </div>
</RadioGroup>

v2.0.0

22 Dec 07:51
Compare
Choose a tag to compare

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 />