Add base support for creating a new API key for an account

This commit is contained in:
Dane Everitt 2020-03-22 18:15:38 -07:00
parent 32f25170f1
commit 933a4733e8
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
17 changed files with 371 additions and 13 deletions

View file

@ -4,6 +4,7 @@ import classNames from 'classnames';
import InputError from '@/components/elements/InputError';
interface Props {
id?: string;
name: string;
children: React.ReactNode;
className?: string;
@ -12,12 +13,12 @@ interface Props {
validate?: (value: any) => undefined | string | Promise<any>;
}
const FormikFieldWrapper = ({ name, label, className, description, validate, children }: Props) => (
const FormikFieldWrapper = ({ id, name, label, className, description, validate, children }: Props) => (
<Field name={name} validate={validate}>
{
({ field, form: { errors, touched } }: FieldProps) => (
<div className={classNames(className, { 'has-error': touched[field.name] && errors[field.name] })}>
{label && <label htmlFor={name}>{label}</label>}
{label && <label htmlFor={id} className={'input-dark-label'}>{label}</label>}
{children}
<InputError errors={errors} touched={touched} name={field.name}>
{description ? <p className={'input-help'}>{description}</p> : null}