1import React from 'react';
2import cn from 'classnames';
4import Flex from './Flex';
5import { useField } from 'react-final-form';
7export default function CheckboxInput({
18 } = useField(name, { type: 'checkbox' });
20 disabled = disabled || submitting;
26 className={cn(className, 'mv2', {
32 pointerEvents: 'none',
33 cursor: 'not-allowed',
36 {/* we totally hide the checkbox itself */}
37 <Flex.Item as="input" className="super-hidden" id={name} {...input} />
38 {/* and then display a prettier one in its stead */}
42 className="f6 mr3 lh-tall us-none clickable flex-row align-center"
47 className={cn('b1 p1 mr3', {
49 'bg-black white b-black': !disabled && input.value,
50 '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