forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import {type StyleProp, View, type ViewStyle} from 'react-native'
2import type React from 'react'
3
4import {atoms as a, useBreakpoints, useTheme} from '#/alf'
5import {Text} from '#/components/Typography'
6
7export function FormContainer({
8 testID,
9 titleText,
10 children,
11 style,
12}: {
13 testID?: string
14 titleText?: React.ReactNode
15 children: React.ReactNode
16 style?: StyleProp<ViewStyle>
17}) {
18 const {gtMobile} = useBreakpoints()
19 const t = useTheme()
20 return (
21 <View
22 testID={testID}
23 style={[a.gap_md, a.flex_1, !gtMobile && [a.px_lg, a.py_md], style]}>
24 {titleText && !gtMobile && (
25 <Text style={[a.text_xl, a.font_semi_bold, t.atoms.text_contrast_high]}>
26 {titleText}
27 </Text>
28 )}
29 {children}
30 </View>
31 )
32}