Search.tsx 959 Bytes
Newer Older
1
2
3
4
import { View, Button } from "native-base";
import React from "react";
import SearchBar from "./SearchBar";
import { StyleSheet, Text } from 'react-native';
Thor-Herman's avatar
Thor-Herman committed
5
import { BrowseScreenProps } from "../pages/BrowseScreen";
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

// SearchBar and Filter Button combined 
const Search = ({navigation}: BrowseScreenProps) => {
  return (
    <View style={styles.searchView}>
      <SearchBar />
      <Button
        light
        onPress={() => navigation.navigate("Filter")}
        style={styles.filterButton}
      >
        <Text style={styles.filterText}>Filter</Text>
      </Button>
    </View>
  );
};

const styles = StyleSheet.create({
    searchView: {
      display: "flex",
      flexDirection: "row",
      alignItems: "flex-start",
    },
    filterButton: {
      margin: 5,
      width: 60,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
    },
    filterText: {
      fontSize: 15,
    },
  });

export default Search;