-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄 Feat: create new icons and new features home
- Loading branch information
1 parent
9b20fc6
commit 546b425
Showing
14 changed files
with
407 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as React from "react"; | ||
import Svg, { Path } from "react-native-svg"; | ||
|
||
export const BankIcon = () => { | ||
return ( | ||
<Svg width={30} height={30} viewBox="0 0 20 20" fill="none"> | ||
<Path | ||
d="M1.667 6.667V10H2.5V15h-.833v2.5h16.666V15H17.5v-5h.833V6.668l-8.333-5-8.333 5zM5 15v-5h1.667v5H5zm4.167 0v-5h1.666v5H9.167zM15 15h-1.667v-5H15v5zm-3.333-8.333A1.669 1.669 0 018.82 7.845a1.667 1.667 0 112.847-1.178z" | ||
fill="#fff" | ||
/> | ||
</Svg> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import * as React from "react"; | ||
import Svg, { Path } from "react-native-svg"; | ||
|
||
export const WalletIcon = () => { | ||
return ( | ||
<Svg width={30} height={30} viewBox="0 0 20 20" fill="none"> | ||
<Path d="M11.667 7.5h6.666v5h-6.666v-5z" fill="#fff" /> | ||
<Path | ||
d="M16.667 2.5h-12.5a2.503 2.503 0 00-2.5 2.5v10c0 1.378 1.121 2.5 2.5 2.5h12.5c.919 0 1.666-.747 1.666-1.667v-1.666h-6.666c-.92 0-1.667-.748-1.667-1.667v-5c0-.92.748-1.667 1.667-1.667h6.666V4.167c0-.92-.747-1.667-1.666-1.667z" | ||
fill="#fff" | ||
/> | ||
</Svg> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
module.exports = function(api) { | ||
module.exports = function (api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
presets: ["babel-preset-expo"], | ||
plugins: [ | ||
[ | ||
"module-resolver", | ||
{ | ||
extensions: [".tsx", ".ts", ".js", ".json"], | ||
}, | ||
], | ||
"react-native-reanimated/plugin", | ||
], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
import { useContext } from "react"; | ||
import { UserContext } from "../context/UserContext"; | ||
import { useContext, useEffect } from "react"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createStackNavigator } from "@react-navigation/stack"; | ||
import { theme } from "../../styles/theme"; | ||
import Home from "../templates/Home/Home"; | ||
import WelcomeScreen from "../templates/Welcome/Welcome"; | ||
import { SignUp } from "../templates/SignUp/SignUp"; | ||
import { Login } from "../templates/Login/Login"; | ||
import { Wallet } from "../templates/Wallet/Wallet"; | ||
|
||
const Stack = createStackNavigator(); | ||
|
||
export const Main = () => { | ||
const context = useContext(UserContext); | ||
const isAuthenticated = context?.user.token ? true : false; | ||
export const Main = ({ isAuthenticated }: any) => { | ||
return ( | ||
<> | ||
<NavigationContainer theme={theme}> | ||
<Stack.Navigator> | ||
{isAuthenticated ? ( | ||
<Stack.Group> | ||
<Stack.Screen name="Inicio" component={Home} /> | ||
</Stack.Group> | ||
<NavigationContainer theme={theme}> | ||
<Stack.Navigator | ||
screenOptions={{ headerShown: true }} | ||
initialRouteName="Home" | ||
> | ||
<Stack.Group> | ||
{/* {isAuthenticated ? ( | ||
<> | ||
<Stack.Screen name="Home" component={Home} /> | ||
</> | ||
) : ( | ||
<Stack.Group screenOptions={{ headerShown: false }}> | ||
<Stack.Screen name="Home" component={WelcomeScreen} /> | ||
<Stack.Screen name="Cadastrar" component={SignUp} /> | ||
<Stack.Screen name="Login" component={Login} /> | ||
</Stack.Group> | ||
)} | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
</> | ||
<> */} | ||
<Stack.Screen name="Home" component={Home} /> | ||
<Stack.Screen name="Welcome" component={WelcomeScreen} /> | ||
<Stack.Screen name="Cadastrar" component={SignUp} /> | ||
<Stack.Screen name="Login" component={Login} /> | ||
<Stack.Screen name="Wallet" component={Wallet} /> | ||
{/* </> | ||
)} */} | ||
</Stack.Group> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { | ||
ColorValue, | ||
StyleSheet, | ||
Text, | ||
TouchableOpacity, | ||
View, | ||
} from "react-native"; | ||
import { theme } from "../../../styles/theme"; | ||
import { WalletIcon } from "../../../assets/svg/WalletIcon"; | ||
|
||
export type ButtonCategoryProps = { | ||
categoryName: string; | ||
onClick: () => void; | ||
icon: React.ReactNode; | ||
color: ColorValue; | ||
}; | ||
|
||
export const ButtonCategory = ({ | ||
categoryName, | ||
onClick, | ||
icon, | ||
color, | ||
}: ButtonCategoryProps) => { | ||
const styles = StyleSheet.create({ | ||
circle: { | ||
width: 70, | ||
height: 70, | ||
borderRadius: 70 / 2, | ||
backgroundColor: color, | ||
aspectRatio: 1, | ||
}, | ||
icon: { | ||
width: 70, | ||
height: 70, | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
}, | ||
primaryButton: { | ||
margin: 10, | ||
backgroundColor: theme.colorsSecondary.green[400], | ||
paddingVertical: 10, | ||
paddingHorizontal: 20, | ||
borderRadius: 5, | ||
}, | ||
secondaryButton: { | ||
margin: 10, | ||
backgroundColor: theme.colorsSecondary.blue[400], | ||
paddingVertical: 10, | ||
paddingHorizontal: 20, | ||
borderRadius: 5, | ||
}, | ||
buttonText: { | ||
color: "white", | ||
fontSize: 16, | ||
textAlign: "center", | ||
}, | ||
}); | ||
|
||
return ( | ||
<View | ||
style={{ | ||
display: "flex", | ||
alignItems: "center", | ||
flexDirection: "column", | ||
justifyContent: "center", | ||
width: "33.33%" | ||
}} | ||
> | ||
<Text | ||
style={{ | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
fontWeight: "600", | ||
marginBottom: 10, | ||
fontSize: 16, | ||
textAlign: "center", | ||
}} | ||
> | ||
{categoryName} | ||
</Text> | ||
<TouchableOpacity onPress={onClick}> | ||
<View style={styles.circle}> | ||
<View style={styles.icon}>{icon}</View> | ||
</View> | ||
</TouchableOpacity> | ||
</View> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.