npm install --save react-basic-checkbox
yarn add react-basic-checkbox
import React from 'react'
import CheckBox from 'react-simple-checkbox'
function Example(){
return (
<CheckBox callback={(status)=>{console.log(status)}} /> // Log true or false on console
<CheckBox marked={false} width={50} height={60} />
<CheckBox markedColor = {"#153FAE"} borderColor = {"#135EAF"} />
<CheckBox color={"#000000"} />
)
}
props | type |
---|---|
marked | Boolean |
width | Number (px) |
height | Number (px) |
callback | Function to return checkbox component marked state |
markedColor | Background color when checkbox is marked |
borderColor | Color to checkbox border |
color | Global color to marked and border |
MIT © gu7z