changed name of SearchBar to TextInputBar
This commit is contained in:
parent
5876fcaf8e
commit
e1efed5b21
2 changed files with 8 additions and 6 deletions
|
|
@ -9,7 +9,7 @@ interface SearchBarProps extends ViewProps {
|
|||
onChangeText? : (text: string) => void | undefined
|
||||
}
|
||||
|
||||
export default function SearchBar(props: SearchBarProps) {
|
||||
export default function TextInputBar(props: SearchBarProps) {
|
||||
const [isActive, setIsactive] = React.useState(false);
|
||||
const { colors } = useTheme();
|
||||
const [text, setText] = useState<string>("");
|
||||
|
|
@ -43,7 +43,7 @@ export default function SearchBar(props: SearchBarProps) {
|
|||
// changed styles.container to containerStyle
|
||||
return (
|
||||
<View style={containerStyle}>
|
||||
<TextInput onChangeText = {handleChange} style={[{fontSize: SIZES.normal, height: "100%"}, styles.TextInput]} autoCorrect={false} keyboardType='web-search' placeholder={props.placeholder} value={text}/>
|
||||
<TextInput onChangeText = {handleChange} style={[{fontSize: SIZES.normal, height: "100%"}, styles.TextInput]} autoCorrect={false} keyboardType='default' placeholder={props.placeholder} value={text}/>
|
||||
|
||||
{isActive &&
|
||||
<TouchableOpacity style={styles.cancel} onPress={()=>{handleChange("")}}>
|
||||
|
|
@ -5,11 +5,13 @@ import ExpenseItem from "./home/expenseItem"
|
|||
|
||||
//common
|
||||
import CustomCard from "./common/CustomCard"
|
||||
import SearchBar from "./common/SearchBar"
|
||||
import NavigationButton from "./common/button"
|
||||
import LoadingSymbol from "./common/loadingSymbol"
|
||||
import Plus from "./common/plus"
|
||||
import TextInputBar from "./common/TextInputBar"
|
||||
import AutoDecimalInput from "./common/AutoDecimalInput"
|
||||
import CategorySelector from "./common/CategorySelector"
|
||||
import CategorySelectorModal from "./common/CategorySelectorModal"
|
||||
|
||||
//login
|
||||
import BudgetHeader from "./budget/budgetHeader"
|
||||
|
|
@ -21,8 +23,8 @@ import TypeSelectorSwitch from "./budget/typeSelectorSwitch"
|
|||
import Input from "./login/input"
|
||||
|
||||
export {
|
||||
BudgetHeader, ButtonSetting, CategoryItem, CustomCard, CustomColorPicker, ExpenseItem, Input,
|
||||
LoadingSymbol, NavigationButton, Plus,
|
||||
SearchBar, ToggleSetting, TypeSelectorSwitch, Welcome, AutoDecimalInput
|
||||
BudgetHeader, ButtonSetting, CustomCard, ExpenseItem, Input,
|
||||
LoadingSymbol, Plus,
|
||||
TextInputBar, ToggleSetting, Welcome, AutoDecimalInput
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue