ui: fix borked styling
This commit is contained in:
parent
7f290c6e52
commit
b8b481b57b
8 changed files with 68 additions and 55 deletions
|
@ -1,6 +1,5 @@
|
|||
import React from 'react';
|
||||
import { FormikErrors, FormikTouched } from 'formik';
|
||||
import tw from 'twin.macro';
|
||||
import { capitalize } from '@/helpers';
|
||||
|
||||
interface Props {
|
||||
|
@ -12,7 +11,7 @@ interface Props {
|
|||
|
||||
const InputError = ({ errors, touched, name, children }: Props) => (
|
||||
touched[name] && errors[name] ?
|
||||
<p css={tw`text-xs text-red-400 pt-2`}>
|
||||
<p className={'input-help error'}>
|
||||
{typeof errors[name] === 'string' ?
|
||||
capitalize(errors[name] as string)
|
||||
:
|
||||
|
@ -21,7 +20,7 @@ const InputError = ({ errors, touched, name, children }: Props) => (
|
|||
</p>
|
||||
:
|
||||
<>
|
||||
{children ? <p css={tw`text-xs text-neutral-400 pt-2`}>{children}</p> : null}
|
||||
{children ? <p className={'input-help'}>{children}</p> : null}
|
||||
</>
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue