1import React from 'react'
2import PropTypes from 'prop-types';
3import ProtoButton from './ProtoButton'
5const CheckboxButton = props => {
7 const onOff = props.state === true
8 ? 'cb-on br-blue bg-blue outline-blue'
9 : 'bg-transparent br-black outline-blue';
11 const checkmarkState = props.state === true ? 'o-100' : 'o-0'
13 const classes = props.disabled ? 'br-gray-30 bg-gray-10' : onOff
18 className={`flex items-center ${props.className}`}
22 // {...getDomProps(props)}
24 className={ `s-7 p-0 o-blue mr-4 bs-solid bw-2 ${classes}` }>
27 className={checkmarkState}
32 xmlns='http://www.w3.org/2000/svg'>
34 d='M2 3.55661V0H0V5.55661H12.4182V3.55661H2Z'
35 transform='translate(6, 13) rotate(-45)'
48CheckboxButton.propTypes = {
49 state: PropTypes.bool,
50 className: PropTypes.string,
54CheckboxButton.defaultProps = {
60export default CheckboxButton
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list