@@ -4,6 +4,7 @@ import { View, ViewProps } from 'react-native';
44
55import { useTheme } from '../../theme' ;
66import { getOverrides , WithOverrides } from '../../utils/overrides' ;
7+ import { OptionalString } from '../../utils/types' ;
78import { Label , LabelProps , Text , TextProps } from '../Typography' ;
89
910type FormFieldLabelPosition = 'top' | 'left' | 'right' ;
@@ -12,12 +13,12 @@ interface FormFieldBaseProps {
1213 /**
1314 * Error message of the field
1415 */
15- error ?: string | false ;
16+ error ?: OptionalString ;
1617
1718 /**
1819 * Label of the field.
1920 */
20- label ?: string | false ;
21+ label ?: OptionalString ;
2122
2223 /**
2324 * Position of the field.
@@ -28,7 +29,7 @@ interface FormFieldBaseProps {
2829 /**
2930 * Description of the field.
3031 */
31- description ?: string ;
32+ description ?: OptionalString ;
3233
3334 /** Content to wrap FormField with. */
3435 children ?: React . ReactNode ;
@@ -112,7 +113,7 @@ const StyledRoot = (props: RootProps) => {
112113} ;
113114
114115interface DescriptionProps extends TextProps , PropsWithChildren {
115- description ?: string | false ;
116+ description ?: OptionalString ;
116117}
117118
118119const StyledDescription = ( props : DescriptionProps ) => {
@@ -137,7 +138,7 @@ const StyledDescription = (props: DescriptionProps) => {
137138} ;
138139
139140interface ErrorProps extends TextProps , PropsWithChildren {
140- error ?: string | false ;
141+ error ?: OptionalString ;
141142}
142143
143144const StyledError = ( props : ErrorProps ) => {
0 commit comments