fix: remove the error/success icons in <FormState />

This commit is contained in:
Divlo
2022-08-29 20:04:24 +02:00
parent 88f1cedcdc
commit c4bb7c9b17
5 changed files with 16 additions and 47 deletions

View File

@ -1,10 +0,0 @@
import { render } from '@testing-library/react'
import { Header } from '.'
describe('<Header />', () => {
it('should render', () => {
const { getByText } = render(<Header />)
expect(getByText('Thream')).toBeInTheDocument()
})
})

View File

@ -27,31 +27,21 @@ export const FormState: React.FC<FormStateProps> = (props) => {
}
return (
<>
<div
{...rest}
className={classNames(
props.className,
'mt-6 flex max-w-xl items-center text-center font-medium',
{
'text-red-800 dark:text-red-400': state === 'error',
'text-green-800 dark:text-green-400': state === 'success'
}
)}
>
<div className='thumbnail inline bg-cover font-headline' />
<span id={id} className='pl-2'>
<b>{t(`errors:${state}`)}:</b> {message}
</span>
</div>
<style jsx>{`
.thumbnail {
height: 20px;
width: 20px;
background-image: url('/images/svg/icons/input/${state}.svg');
<div
{...rest}
className={classNames(
props.className,
'mt-6 flex max-w-xl items-center text-center font-medium',
{
'text-red-800 dark:text-red-400': state === 'error',
'text-green-800 dark:text-green-400': state === 'success'
}
`}</style>
</>
)}
>
<div className='inline bg-cover font-headline' />
<span id={id} className='pl-2'>
<b>{t(`errors:${state}`)}:</b> {message}
</span>
</div>
)
}