Animate errors

This commit is contained in:
Ben Grant 2021-06-05 18:13:21 +10:00
parent 02adb1e380
commit eb449b6841
5 changed files with 19 additions and 10 deletions

View file

@ -229,9 +229,7 @@ const Create = ({ offline }) => {
defaultOption={t('home:form.timezone.defaultOption')}
/>
{error && (
<Error onClose={() => setError(null)}>{error}</Error>
)}
<Error open={!!error} onClose={() => setError(null)}>{error}</Error>
<Button type="submit" isLoading={isLoading} disabled={isLoading} buttonWidth="100%">{t('home:form.button')}</Button>
</CreateForm>

View file

@ -352,7 +352,7 @@ const Event = (props) => {
buttonWidth={`${Math.max(t('event:form.button').length*11, 100)}px`}
>{t('event:form.button')}</Button>
</LoginForm>
{error && <Error onClose={() => setError(null)}>{error}</Error>}
<Error open={!!error} onClose={() => setError(null)}>{error}</Error>
<Info>{t('event:form.info')}</Info>
</>
)}

View file

@ -206,9 +206,7 @@ const Home = ({ offline }) => {
defaultOption={t('home:form.timezone.defaultOption')}
/>
{error && (
<Error onClose={() => setError(null)}>{error}</Error>
)}
<Error open={!!error} onClose={() => setError(null)}>{error}</Error>
<Center>
<Button type="submit" isLoading={isLoading} disabled={isLoading}>{t('home:form.button')}</Button>