1import React from 'react';
2import cn from 'classnames';
4import Flex from './Flex';
5import { useField } from 'react-final-form';
6import { Checkbox } from '@tlon/indigo-react';
8export default function CheckboxInput({
21 meta: { submitting, submitSucceeded },
22 } = useField(name, { type: 'checkbox' });
24 disabled = disabled || submitting || submitSucceeded;
30 className={cn(className, {
37 pointerEvents: 'none',
38 cursor: 'not-allowed',
41 {/* we totally hide the checkbox itself */}
42 <Flex.Item as="input" className="super-hidden" id={name} {...input} />
43 {/* and then display a prettier one in its stead */}
49 'lh-tall us-none pointer flex-row align-center'
51 style={{ fontSize: '14px' }}
53 <Flex style={{ marginRight: '8px' }}>
54 <Checkbox selected={input.checked} />
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