diff options
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/Login/ForgotPasswordForm.tsx | 2 | ||||
-rw-r--r-- | src/screens/Login/FormError.tsx | 34 | ||||
-rw-r--r-- | src/screens/Login/LoginForm.tsx | 2 | ||||
-rw-r--r-- | src/screens/Login/SetNewPasswordForm.tsx | 2 |
4 files changed, 3 insertions, 37 deletions
diff --git a/src/screens/Login/ForgotPasswordForm.tsx b/src/screens/Login/ForgotPasswordForm.tsx index fa674155a..ab9d02536 100644 --- a/src/screens/Login/ForgotPasswordForm.tsx +++ b/src/screens/Login/ForgotPasswordForm.tsx @@ -17,7 +17,7 @@ import {logger} from '#/logger' import {Button, ButtonText} from '#/components/Button' import {Text} from '#/components/Typography' import {FormContainer} from './FormContainer' -import {FormError} from './FormError' +import {FormError} from '#/components/forms/FormError' type ServiceDescription = ComAtprotoServerDescribeServer.OutputSchema diff --git a/src/screens/Login/FormError.tsx b/src/screens/Login/FormError.tsx deleted file mode 100644 index 3c6a8649d..000000000 --- a/src/screens/Login/FormError.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react' -import {StyleSheet, View} from 'react-native' - -import {Warning_Stroke2_Corner0_Rounded as Warning} from '#/components/icons/Warning' -import {Text} from '#/components/Typography' -import {atoms as a, useTheme} from '#/alf' -import {colors} from '#/lib/styles' - -export function FormError({error}: {error?: string}) { - const t = useTheme() - - if (!error) return null - - return ( - <View style={styles.error}> - <Warning fill={t.palette.white} size="sm" /> - <View style={(a.flex_1, a.ml_sm)}> - <Text style={[{color: t.palette.white}, a.font_bold]}>{error}</Text> - </View> - </View> - ) -} - -const styles = StyleSheet.create({ - error: { - backgroundColor: colors.red4, - flexDirection: 'row', - alignItems: 'center', - marginBottom: 15, - borderRadius: 8, - paddingHorizontal: 8, - paddingVertical: 8, - }, -}) diff --git a/src/screens/Login/LoginForm.tsx b/src/screens/Login/LoginForm.tsx index 580155281..ee47aa41d 100644 --- a/src/screens/Login/LoginForm.tsx +++ b/src/screens/Login/LoginForm.tsx @@ -24,7 +24,7 @@ import {At_Stroke2_Corner0_Rounded as At} from '#/components/icons/At' import {Lock_Stroke2_Corner0_Rounded as Lock} from '#/components/icons/Lock' import {HostingProvider} from '#/components/forms/HostingProvider' import {FormContainer} from './FormContainer' -import {FormError} from './FormError' +import {FormError} from '#/components/forms/FormError' type ServiceDescription = ComAtprotoServerDescribeServer.OutputSchema diff --git a/src/screens/Login/SetNewPasswordForm.tsx b/src/screens/Login/SetNewPasswordForm.tsx index be0732483..678440cf4 100644 --- a/src/screens/Login/SetNewPasswordForm.tsx +++ b/src/screens/Login/SetNewPasswordForm.tsx @@ -16,7 +16,7 @@ import {Lock_Stroke2_Corner0_Rounded as Lock} from '#/components/icons/Lock' import {Ticket_Stroke2_Corner0_Rounded as Ticket} from '#/components/icons/Ticket' import {Button, ButtonText} from '#/components/Button' import {useTheme, atoms as a} from '#/alf' -import {FormError} from './FormError' +import {FormError} from '#/components/forms/FormError' export const SetNewPasswordForm = ({ error, |