Skip to content

kafeihaoka/react-beautiful-radio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-beautiful-radio

gras

DEMO示例地址:https://kafeihaoka.github.io/react-beautiful-radio/

安装依赖

npm i react-beautiful-radio -S

API 介绍

Property Description Type Default
checked 是否选中 bool false
disabled 是否禁用 bool false
value 描述文本 string -
onClick 点击事件 function(e){} -

用法示例


import BeautyRadio from "react-beautiful-radio";

class RadioDemo extends React.Component {
      state = {
        checked : true
      };

    handleChange = () => {
        this.setState({
            checked: !this.state.checked
        })
    }

  render() {
    const { checked } = this.state;
    return (
      <div>
        <BeautyRadio
          checked={checked}
          value={'apple'}
          onClick={this.handleChange}
        />
      </div>
    );
  }
}

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

相关资料

  • react component radio react-beautiful-radio

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published