Skip to content
Snippets Groups Projects

final touches 2.0

Merged Amund Skuggevik Foss requested to merge Last_touches into master
4 files
+ 15
23
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 5
10
import { textAlign } from '@mui/system';
import React, { useEffect } from 'react';
import React from 'react';
import { Image, Text,TextInput, StyleSheet, View } from "react-native";
import SelectDropdown from 'react-native-select-dropdown'
import {useRecoilState} from 'recoil'
@@ -7,6 +6,7 @@ import {searchState, capturedFilterState, typeState } from "../atoms/atoms";
export const Header = () => {
// hooks states init
const [searchTextValue, setSearchTextValue] = useRecoilState(searchState)
const [capturedFiltering, setCapturedFiltering] = useRecoilState(capturedFilterState)
const [type, setType] = useRecoilState(typeState)
@@ -18,7 +18,7 @@ export const Header = () => {
// all types of pokemons on the app
const filterTypes = [
"All",
"Bug",
@@ -61,13 +61,9 @@ export const Header = () => {
return (
<View>
<View style={styles.imgContainer}>
<Image style = {styles.pokemonImg} source={require("../resources/pokemonLogo.png")} />
</View>
<View style={styles.filteringContainer}>
<Text style={{fontSize: 20, marginBottom: 5}}>Types</Text>
<SelectDropdown
@@ -78,14 +74,13 @@ export const Header = () => {
TypeChange(selectedItem)
}}
buttonTextAfterSelection={(selectedItem) => {
// text represented after item is selected
// text after selection
return selectedItem
}}
rowTextForSelection={(item) => {
// text represented for each item in dropdown
// text for each item
return item
}}
/>
<Text style={{fontSize: 20, marginBottom: 5}}>Status</Text>
<SelectDropdown
Loading