1import React from 'react';
2import cn from 'classnames';
4import Flex from './Flex';
5import { useField } from 'react-final-form';
7export default function CheckboxInput({
20 disabled = disabled || submitting;
26 className={cn(className, 'mv2', {
32 pointerEvents: 'none',
33 cursor: 'not-allowed',
36 {/* we totally hide the checkbox itself */}
40 className="super-hidden"
43 // TODO: this seems hacky... final-form should have a standard way to do this
45 onClick={e => input.onChange(!input.value)}
47 {/* and then display a prettier one in its stead */}
51 className="f6 mr3 lh-tall us-none clickable flex-row align-center"
56 className={cn('b1 p1 mr3', {
58 'bg-black white b-black': !disabled && input.value,
59 'bg-white black b-black': !disabled && !input.value,
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