diff --git a/src/view/com/forms/InputText.tsx b/src/view/com/forms/InputText.tsx index 4f136a3241..55506b84d7 100644 --- a/src/view/com/forms/InputText.tsx +++ b/src/view/com/forms/InputText.tsx @@ -2,14 +2,17 @@ import React from 'react' import {View, TextInput, TextInputProps, TextStyle} from 'react-native' import {useTheme, atoms, web, tokens} from '#/alf' +import {Text} from '#/view/com/Typography' type Props = Omit & { + label?: string placeholder: string hasError?: boolean icon?: React.FunctionComponent } -export function InputText({hasError, icon: Icon, ...props}: Props) { +export function InputText({label, hasError, icon: Icon, ...props}: Props) { + const labelId = React.useId() const t = useTheme() const [state, setState] = React.useState({ hovered: false, @@ -77,7 +80,23 @@ export function InputText({hasError, icon: Icon, ...props}: Props) { return ( + {label && ( + + {label} + + )} + - +