move FormError to components/forms
This commit is contained in:
parent
f491bd89cc
commit
08d12d9a3d
4 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
})
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue