import { DuffelCardFormStyles } from '../../../index'; import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; interface FormFieldProps { label?: string; error?: string; children: React.ReactNode; labelStyles?: DuffelCardFormStyles['label']; formFieldStyle: DuffelCardFormStyles['formField']; errorMessageStyles: DuffelCardFormStyles['errorMessage']; } export const FormField: React.FC = ({ label, error, children, labelStyles, formFieldStyle, errorMessageStyles, }) => { return ( {label && {label}} {children} {error} ); }; const defaultStyles = StyleSheet.create({ formField: { marginBottom: 10, }, label: { fontSize: 14, fontWeight: 'bold', }, error: { fontSize: 12, color: '#CC0000', }, errorInvisible: { opacity: 0, }, });