Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

hog FormError

+10 -15
+10 -15
src/components/forms/FormError.tsx
··· 1 1 import React from 'react' 2 - import {StyleSheet, View} from 'react-native' 2 + import {View} from 'react-native' 3 3 4 4 import {Warning_Stroke2_Corner0_Rounded as Warning} from '#/components/icons/Warning' 5 5 import {Text} from '#/components/Typography' 6 6 import {atoms as a, useTheme} from '#/alf' 7 - import {colors} from '#/lib/styles' 8 7 9 8 export function FormError({error}: {error?: string}) { 10 9 const t = useTheme() ··· 12 11 if (!error) return null 13 12 14 13 return ( 15 - <View style={styles.error}> 14 + <View 15 + style={[ 16 + {backgroundColor: t.palette.negative_600}, 17 + a.flex_row, 18 + a.align_center, 19 + a.mb_lg, 20 + a.rounded_sm, 21 + a.p_sm, 22 + ]}> 16 23 <Warning fill={t.palette.white} size="sm" /> 17 24 <View style={(a.flex_1, a.ml_sm)}> 18 25 <Text style={[{color: t.palette.white}, a.font_bold]}>{error}</Text> ··· 20 27 </View> 21 28 ) 22 29 } 23 - 24 - const styles = StyleSheet.create({ 25 - error: { 26 - backgroundColor: colors.red4, 27 - flexDirection: 'row', 28 - alignItems: 'center', 29 - marginBottom: 15, 30 - borderRadius: 8, 31 - paddingHorizontal: 8, 32 - paddingVertical: 8, 33 - }, 34 - })