1import React from 'react';
2import cn from 'classnames';
4import { ForwardButton } from 'components/Buttons';
6import { blinkIf } from 'components/Blinky';
7import { useFormState } from 'react-final-form';
9export default function SubmitButton({
10 as: As = ForwardButton,
16 const { valid, validating, submitting, submitError } = useFormState({
27 className={cn('mt4', className)}
28 disabled={!valid || validating || submitting}
29 accessory={blinkIf(validating || submitting)}
30 onClick={handleSubmit}
33 {submitError ? 'Error submitting' : children}
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