1import React from 'react';
2import cn from 'classnames';
4import { useField } from 'react-final-form';
5import { Checkbox } from '@tlon/indigo-react';
7export default function CheckboxInput({
20 meta: { submitting, submitSucceeded },
21 } = useField(name, { type: 'checkbox' });
23 disabled = disabled || submitting || submitSucceeded;
27 className={cn(className, {
34 pointerEvents: 'none',
35 cursor: 'not-allowed',
38 {/* we totally hide the checkbox itself */}
39 <input checkbox className="super-hidden" id={name} {...input} />
40 {/* and then display a prettier one in its stead */}
49 <Checkbox selected={input.checked} style={{ marginRight: '8px' }} />
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