wisnuciwun / react-custom-checkbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Checkbox 🍎

+ Short Documentation

🍚 Requirement :

  • plain React JS only

πŸ‘€ Usage :

  • Put this file to your component directory folder. You can choose to make a new folder or not.
  • import this component to your views or other component in JSX.

☎️ Parameters :

  • children = put your text or element to placed beside checkbox
  • checked = boolean state for checkbox
  • onChange = onChange event
  • onClick = onClick event
  • ...rest = to initiate all events but not showing in vscode suggest like onChange & onClick
  • name = to naming checkbox input value
  • classNameDiv = add your own css classname

πŸ“Ž Example :

 <div>
     <Checkbox onClick={this.onCheckList} name='checkedOne' checked={this.state.checkedOne}>
          <span>One</span>
     </Checkbox>
     <Checkbox onClick={this.onCheckList} name='checkedTwo' checked={this.state.checkedTwo}>
          <span>Two</span>
     </Checkbox>
</div>

About


Languages

Language:CSS 51.5%Language:JavaScript 48.5%