Skip to content
Source
Sign inSign up

ConnectionFormField.tsx

28 lines897 Bytes

1import { View } from "react-native";
2​
3import { AppText, AppTextInput, type AppTextInputProps } from "../../components/ui/AppText";
4import { cn } from "../../lib/cn";
5​
6type ConnectionFormFieldProps = Omit<AppTextInputProps, "accessibilityLabel" | "className"> & {
7 readonly label: string;
8 readonly className?: string;
9};
10​
11export function ConnectionFormField({ label, className, ...inputProps }: ConnectionFormFieldProps) {
12 return (
13 <View collapsable={false} className={cn("gap-1.5", className)}>
14 <AppText
15 accessibilityElementsHidden
16 importantForAccessibility="no-hide-descendants"
17 className="text-2xs font-t3-bold tracking-[0.8px] uppercase text-foreground-muted"
18 >
19 {label}
20 </AppText>
21 <AppTextInput
22 {...inputProps}
23 accessibilityLabel={label}
24 className="rounded-[14px] px-4 py-3.5"
25 />
26 </View>
27 );