import React from 'react' import { StyleSheet } from 'react-native' import { Text } from './Text' import { Touchable } from './Touchables' import { FormLabelProps } from './types' import { useTheme } from '@/hooks' export const FormLabel = ({ label, isRequired, labelStyle, testID, onLabelPress, }: FormLabelProps) => { const { colors } = useTheme() const stylesForRequired = labelStyle && Object.fromEntries( Object.entries(labelStyle).map(([key, value]) => key === 'color' ? [key, 'red'] : [key, value] ) ) if (!label) { return null } return ( {label} {isRequired && ( * )} ) } const styles = StyleSheet.create({ wrapper: { display: 'flex', flexDirection: 'row', marginBottom: 8, }, })