diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-03-20 23:29:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 23:29:24 +0000 |
commit | c649ee1afa80f71f108187df5671ae85eeaeed99 (patch) | |
tree | adb5227f58811d0fe4af023184f9ffd71f66f463 /src/components/forms/FormError.tsx | |
parent | 8ad813cd86c74a987cb81f5278c2eabbe8193db8 (diff) | |
parent | d2d4d3a09206b52fe78018b89f82471c3dd91c8a (diff) | |
download | voidsky-c649ee1afa80f71f108187df5671ae85eeaeed99.tar.zst |
Merge pull request #3217 from bluesky-social/samuel/alf-login
Use ALF for login & signup flow
Diffstat (limited to 'src/components/forms/FormError.tsx')
-rw-r--r-- | src/components/forms/FormError.tsx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/components/forms/FormError.tsx b/src/components/forms/FormError.tsx new file mode 100644 index 000000000..9e72df879 --- /dev/null +++ b/src/components/forms/FormError.tsx @@ -0,0 +1,30 @@ +import React from 'react' +import {View} from 'react-native' + +import {atoms as a, useTheme} from '#/alf' +import {Warning_Stroke2_Corner0_Rounded as Warning} from '#/components/icons/Warning' +import {Text} from '#/components/Typography' + +export function FormError({error}: {error?: string}) { + const t = useTheme() + + if (!error) return null + + return ( + <View + style={[ + {backgroundColor: t.palette.negative_400}, + a.flex_row, + a.rounded_sm, + a.p_md, + a.gap_sm, + ]}> + <Warning fill={t.palette.white} size="md" /> + <View> + <Text style={[{color: t.palette.white}, a.font_bold, a.leading_snug]}> + {error} + </Text> + </View> + </View> + ) +} |