Skip to content

Commit

Permalink
feat: version 1.0.0
Browse files Browse the repository at this point in the history
Version 1.0.0
  • Loading branch information
Quinhas authored May 26, 2022
2 parents b791693 + acde158 commit 8892134
Show file tree
Hide file tree
Showing 38 changed files with 2,516 additions and 239 deletions.
13 changes: 9 additions & 4 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ import {
useFonts
} from "@expo-google-fonts/red-hat-display";
import { LinearGradient } from "expo-linear-gradient";
import { NativeBaseProvider } from "native-base";
import { INativebaseConfig, NativeBaseProvider } from "native-base";
import React from "react";
import Home from "./src/screens/Home";
import { FavoritesContextProvider } from "./src/contexts/FavoritesContext";
import { Routes } from "./src/routes";
import { theme } from "./src/theme";

const config = {
const config: INativebaseConfig = {
dependencies: {
"linear-gradient": LinearGradient,
},
enableRem: true,
strictMode: "warn",
};

export default function App() {
Expand All @@ -47,7 +50,9 @@ export default function App() {

return (
<NativeBaseProvider theme={theme} config={config}>
<Home />
<FavoritesContextProvider>
<Routes />
</FavoritesContextProvider>
</NativeBaseProvider>
);
}
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,31 @@
},
"dependencies": {
"@expo-google-fonts/red-hat-display": "^0.2.2",
"@react-native-async-storage/async-storage": "~1.15.0",
"@react-navigation/bottom-tabs": "^6.3.1",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2",
"axios": "^0.27.2",
"expo": "~42.0.0",
"expo-blur": "~9.0.3",
"expo-font": "~9.2.1",
"expo-linear-gradient": "~9.2.0",
"expo-status-bar": "~1.0.4",
"lodash": "^4.17.21",
"native-base": "3.4.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
"react-native-pager-view": "5.0.12",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.4.0",
"react-native-svg": "12.1.1",
"react-native-tab-view": "^3.1.1",
"react-native-web": "~0.13.12"
},
"resolutions": {
"@types/react": "17.0.43"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@types/react": "~16.9.35",
Expand Down
1 change: 1 addition & 0 deletions src/@types/native-base.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "native-base";
import { theme } from "../theme";

type MyThemeType = typeof theme;
Expand Down
19 changes: 19 additions & 0 deletions src/@types/navigation.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export declare global {
namespace ReactNavigation {
interface RootParamList {
CategoryDetails: {
id: number;
};
DrinkDetails: {
id: number;
};
Tabs: any;
SearchResponse: {
placeholder: string;
categories?: boolean;
drinks?: boolean;
selected: "Drinks" | "Categories";
};
}
}
}
63 changes: 0 additions & 63 deletions src/components/CategoryCard/index.tsx

This file was deleted.

46 changes: 46 additions & 0 deletions src/components/SearchBar/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { FontAwesome5 } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native";
import { Icon, Input } from "native-base";
import React from "react";

type SearchBarProps = {
placeholder: string;
categories?: boolean;
drinks?: boolean;
selected: "Drinks" | "Categories";
};

export function SearchBar({
placeholder,
categories,
drinks,
selected,
}: SearchBarProps) {
const navigation = useNavigation();
return (
<Input
mx={"1.5rem"}
mt={"0.75rem"}
variant={"filled"}
borderRadius={"0.75rem"}
bgColor={"white"}
placeholder={placeholder}
fontSize={"0.9375rem"}
fontWeight={"medium"}
h={"2.25rem"}
py={"0"}
InputLeftElement={
<Icon as={FontAwesome5} name="search" size={"1rem"} px={"0.875rem"} />
}
onClick={() =>
navigation.navigate("SearchResponse", {
placeholder: placeholder,
categories: categories,
drinks: drinks,
selected: selected,
})
}
readonly
/>
);
}
81 changes: 81 additions & 0 deletions src/components/TodaysCategory/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { Box, Flex, Image, Text } from "native-base";
import React from "react";
import { Animated, Pressable } from "react-native";
import { scaleAnimation } from "../../utils/animations/scale";

export function TodaysCategory() {
const animation = scaleAnimation(1, 0.98, 100);
return (
<Flex mx={"1.5rem"} mt={"1rem"}>
<Text fontSize={"1.25rem"} fontWeight={"bold"} mb={"0.5rem"}>
Today's Category
</Text>
<Pressable
onPressIn={animation.onPressIn}
onPressOut={animation.onPressOut}
>
<Animated.View style={animation.style}>
<Box
w={"100%"}
height={"12.5rem"}
borderRadius={"lg"}
position={"relative"}
shadow={"2"}
>
<Text
position={"absolute"}
bottom={"1rem"}
left={"1.5rem"}
zIndex={"4"}
fontWeight={"black"}
fontSize={"1.5rem"}
color={"white"}
>
Ordinary Drinks
</Text>
<Box
w={"100%"}
h={"50%"}
bottom={0}
zIndex={"3"}
position={"absolute"}
borderRadius={"lg"}
bg={{
linearGradient: {
colors: ["rgba(196, 196, 196, 0)", "rgba(0, 210, 255, 0.6)"],
},
}}
/>
<Box
w={"100%"}
h={"100%"}
zIndex={"2"}
position={"absolute"}
borderRadius={"lg"}
bg={"rgba(0,0,0,0.1)"}
/>
<Box
w={"100%"}
h={"100%"}
zIndex={"1"}
position={"absolute"}
borderRadius={"lg"}
bg={"rgba(21, 214, 255, 0.3)"}
/>
<Image
borderRadius={"lg"}
resizeMode={"cover"}
size={"100%"}
zIndex={"0"}
alt={"Imagem de um drink"}
source={{
uri: "https://www.thecocktaildb.com/images/media/drink/rrtssw1472668972.jpg",
cache: "force-cache"
}}
/>
</Box>
</Animated.View>
</Pressable>
</Flex>
);
}
71 changes: 71 additions & 0 deletions src/components/TodaysDrink/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { Box, Flex, Image, Text } from "native-base";
import React from "react";

export function TodaysDrink() {
return (
<Flex mx={"1.5rem"} mt={"1rem"}>
<Text fontSize={"1.25rem"} fontWeight={"bold"} mb={"0.5rem"}>
Today's Drink
</Text>
<Box
w={"100%"}
height={"12.5rem"}
borderRadius={"lg"}
position={"relative"}
shadow={"2"}
>
<Text
position={"absolute"}
bottom={"1rem"}
left={"1.5rem"}
zIndex={"4"}
fontWeight={"black"}
fontSize={"1.5rem"}
color={"white"}
>
Dry Martini
</Text>
<Box
w={"100%"}
h={"50%"}
bottom={0}
zIndex={"3"}
position={"absolute"}
borderRadius={"lg"}
bg={{
linearGradient: {
colors: ["rgba(196, 196, 196, 0)", "rgba(0, 210, 255, 0.6)"],
},
}}
/>
<Box
w={"100%"}
h={"100%"}
zIndex={"2"}
position={"absolute"}
borderRadius={"lg"}
bg={"rgba(0,0,0,0.1)"}
/>
<Box
w={"100%"}
h={"100%"}
zIndex={"1"}
position={"absolute"}
borderRadius={"lg"}
bg={"rgba(21, 214, 255, 0.3)"}
/>
<Image
borderRadius={"lg"}
resizeMode={"cover"}
size={"100%"}
zIndex={"0"}
alt={"Imagem de um drink"}
source={{
uri: "https://www.thecocktaildb.com/images/media/drink/6ck9yi1589574317.jpg",
cache: "force-cache"
}}
/>
</Box>
</Flex>
);
}
Loading

0 comments on commit 8892134

Please sign in to comment.