Skip to content
Source
Sign inSign up

FormSection.android.tsx

23 lines773 Bytes

1import { View } from "react-native";
2​
3import { AppText as Text, AppTextInput as TextInput } from "./AppText";
4import type { FormFieldProps, FormSectionProps } from "./FormSection.types";
5export type { FormFieldProps, FormSectionProps } from "./FormSection.types";
6​
7export function FormSection(props: FormSectionProps) {
8 return (
9 <View className="gap-3 rounded-[20px] bg-card p-4">
10 <Text className="text-base font-t3-medium text-foreground">{props.title}</Text>
11 {props.children}
12 </View>
13 );
15​
16export function FormField({ label, ...props }: FormFieldProps) {
17 return (
18 <>
19 {label ? <Text className="text-sm text-foreground-secondary">{label}</Text> : null}
20 <TextInput {...props} className="rounded-xl bg-sheet-solid" />
21 </>
22 );