Files
App/components/Global/input.tsx
2024-11-28 09:26:43 -06:00

24 lines
730 B
TypeScript

import React, { SetStateAction } from 'react';
import { StyleProp } from 'react-native';
import { Input as TamaguiInput, TextStyle} from 'tamagui';
interface InputProps {
onChangeText: React.Dispatch<SetStateAction<string | undefined>>,
placeholder: string
value: string | undefined;
secureTextEntry?: boolean | undefined;
flexGrow?: boolean | undefined
}
export default function Input(props: InputProps): React.JSX.Element {
return (
<TamaguiInput
placeholder={props.placeholder}
onChangeText={props.onChangeText}
value={props.value}
flexGrow={props.flexGrow ? 1 : "unset"}
secureTextEntry={props.secureTextEntry}
/>
)
}