1import React from 'react';
2import PropTypes from 'prop-types';
3import ProtoButton from './ProtoButton';
5const CheckboxButton = props => {
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;
17 className={`flex items-center ${props.className}`}
18 style={{ cursor: 'pointer', ...props.style }}
19 onClick={props.onToggle}>
21 // {...getDomProps(props)}
23 className={`s-7 p-0 o-blue mr-4 bs-solid bw-2 ${classes}`}>
25 className={checkmarkState}
30 xmlns="http://www.w3.org/2000/svg">
32 d="M2 3.55661V0H0V5.55661H12.4182V3.55661H2Z"
33 transform="translate(6, 13) rotate(-45)"
39 <div>{props.label}</div>
45CheckboxButton.propTypes = {
46 state: PropTypes.bool,
47 className: PropTypes.string,
50CheckboxButton.defaultProps = {
55export 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