mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
1import React from 'react' 2import {View} from 'react-native' 3 4import {atoms as a, useTheme} from '#/alf' 5import {Warning_Stroke2_Corner0_Rounded as Warning} from '#/components/icons/Warning' 6import {Text} from '#/components/Typography' 7 8export function FormError({error}: {error?: string}) { 9 const t = useTheme() 10 11 if (!error) return null 12 13 return ( 14 <View 15 style={[ 16 {backgroundColor: t.palette.negative_400}, 17 a.flex_row, 18 a.rounded_sm, 19 a.p_md, 20 a.gap_sm, 21 ]}> 22 <Warning fill={t.palette.white} size="md" /> 23 <View style={[a.flex_1]}> 24 <Text style={[{color: t.palette.white}, a.font_bold, a.leading_snug]}> 25 {error} 26 </Text> 27 </View> 28 </View> 29 ) 30}