An ATproto social media client -- with an independent Appview.
at main 717 B view raw
1import {View} from 'react-native' 2 3import {atoms as a, useTheme} from '#/alf' 4import {Warning_Stroke2_Corner0_Rounded as Warning} from '#/components/icons/Warning' 5import {Text} from '#/components/Typography' 6 7export function FormError({error}: {error?: string}) { 8 const t = useTheme() 9 10 if (!error) return null 11 12 return ( 13 <View 14 style={[ 15 {backgroundColor: t.palette.negative_400}, 16 a.flex_row, 17 a.rounded_sm, 18 a.p_md, 19 a.gap_sm, 20 ]}> 21 <Warning fill={t.palette.white} size="md" /> 22 <View style={[a.flex_1]}> 23 <Text style={[{color: t.palette.white}, a.font_bold, a.leading_snug]}> 24 {error} 25 </Text> 26 </View> 27 </View> 28 ) 29}