Fix search modal

This commit is contained in:
Dane Everitt 2020-07-04 15:19:46 -07:00
parent 82cf070c06
commit 43ff67238c
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 27 additions and 25 deletions

View file

@ -2,6 +2,8 @@ import React from 'react';
import { Field, FieldProps } from 'formik';
import classNames from 'classnames';
import InputError from '@/components/elements/InputError';
import Label from '@/components/elements/Label';
import tw from 'twin.macro';
interface Props {
id?: string;
@ -18,10 +20,10 @@ const FormikFieldWrapper = ({ id, name, label, className, description, validate,
{
({ field, form: { errors, touched } }: FieldProps) => (
<div className={classNames(className, { 'has-error': touched[field.name] && errors[field.name] })}>
{label && <label htmlFor={id} className={'input-dark-label'}>{label}</label>}
{label && <Label htmlFor={id}>{label}</Label>}
{children}
<InputError errors={errors} touched={touched} name={field.name}>
{description ? <p className={'input-help'}>{description}</p> : null}
{description || null}
</InputError>
</div>
)