import { StyleSheet, Text, TextInput, View } from "react-native"; import React, { useState } from "react"; import Button from "../atoms/Button"; import Icon from "react-native-vector-icons/MaterialCommunityIcons"; type Props = { title: string; setValue: (value: string) => void; initialValue: string; prompt: string; }; const FormField = (props: Props) => { const [inputValue, setInputValue] = useState(props.initialValue); const [showInfo, setShowInfo] = useState(false); return ( {props.title .split(/(?=[A-Z])/) .map((data) => data.charAt(0).toUpperCase() + data.slice(1)) .join(" ")} setInputValue(text)} />