ant-design/components/radio/demo/disable.md
Marius Ileana 71683f0cf6 docs: radio/demo/disable.md - English translation (#3006)
English translation of labels
2016-09-12 10:10:43 +08:00

816 B

order title
1
zh-CN en-US
不可用 disabled

zh-CN

Radio 不可用。

en-US

Radio unavailable.

import { Radio, Button } from 'antd';

const App = React.createClass({
  getInitialState() {
    return {
      disabled: true,
    };
  },
  toggleDisabled() {
    this.setState({
      disabled: !this.state.disabled,
    });
  },
  render() {
    return (
      <div>
        <Radio defaultChecked={false} disabled={this.state.disabled}>Disabled</Radio>
        <br />
        <Radio defaultChecked disabled={this.state.disabled}>Disabled</Radio>
        <div style={{ marginTop: 20 }}>
          <Button type="primary" onClick={this.toggleDisabled}>
            Toggle disabled
          </Button>
        </div>
      </div>
    );
  },
});

ReactDOM.render(<App />, mountNode);