ant-design/components/radio/demo/disabled.md
偏右 b83c8636fa
chore: 📦 enable ESBUILD for site again (#24657)
* 📦 enable ESBUILD for site again

* re-enable ESBUILD 📦
2020-06-01 19:29:58 +08:00

792 B

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

zh-CN

Radio 不可用。

en-US

Radio unavailable.

import { Radio, Button } from 'antd';

class App extends React.Component {
  state = {
    disabled: true,
  };

  toggleDisabled = () => {
    this.setState({
      disabled: !this.state.disabled,
    });
  };

  render() {
    return (
      <>
        <Radio defaultChecked={false} disabled={this.state.disabled}>
          Disabled
        </Radio>
        <Radio defaultChecked disabled={this.state.disabled}>
          Disabled
        </Radio>
        <br />
        <Button type="primary" onClick={this.toggleDisabled} style={{ marginTop: 16 }}>
          Toggle disabled
        </Button>
      </>
    );
  }
}

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