Skip to content

Commit

Permalink
create new components to account section
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasviga committed Sep 23, 2021
1 parent 518d83d commit 2e90f68
Show file tree
Hide file tree
Showing 17 changed files with 577 additions and 160 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ task copyDownloadableDepsToLibs(type: Copy) {
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

project.ext.vectoricons = [
iconFontNames: [ 'AntDesign.ttf', 'MaterialIcons.ttf', 'EvilIcons.ttf', 'MaterialCommunityIcons.ttf', 'Entypo.ttf' ] // Name of the font files you want to copy
iconFontNames: [ 'AntDesign.ttf', 'MaterialIcons.ttf', 'EvilIcons.ttf', 'MaterialCommunityIcons.ttf', 'Entypo.ttf', 'Feather.ttf' ] // Name of the font files you want to copy
]

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Binary file added android/app/src/main/assets/fonts/icomoon.ttf
Binary file not shown.
13 changes: 13 additions & 0 deletions android/app/src/main/java/com/nubankclone/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.nubankclone;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

public class MainActivity extends ReactActivity {

Expand All @@ -12,4 +15,14 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "nubankclone";
}

@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}
4 changes: 4 additions & 0 deletions ios/nubankclone.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
2DC0CD2396F04D26BFD6495F /* GraphikBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = A5B0DC32C796429199378005 /* GraphikBold.otf */; };
E1B4E41076BA4B0985B3FDD4 /* GraphikMedium.otf in Resources */ = {isa = PBXBuildFile; fileRef = B71E1EFEDF144331897B3A36 /* GraphikMedium.otf */; };
7F743A933F0741D98EB5D161 /* GraphikRegular.otf in Resources */ = {isa = PBXBuildFile; fileRef = A9D99FE90A624E97BC20077B /* GraphikRegular.otf */; };
785BAE5F79A2433991F79D81 /* icomoon.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4CCAD5E15981461E8057D087 /* icomoon.ttf */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -82,6 +83,7 @@
A5B0DC32C796429199378005 /* GraphikBold.otf */ = {isa = PBXFileReference; name = "GraphikBold.otf"; path = "../src/assets/fonts/GraphikBold.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
B71E1EFEDF144331897B3A36 /* GraphikMedium.otf */ = {isa = PBXFileReference; name = "GraphikMedium.otf"; path = "../src/assets/fonts/GraphikMedium.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
A9D99FE90A624E97BC20077B /* GraphikRegular.otf */ = {isa = PBXFileReference; name = "GraphikRegular.otf"; path = "../src/assets/fonts/GraphikRegular.otf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
4CCAD5E15981461E8057D087 /* icomoon.ttf */ = {isa = PBXFileReference; name = "icomoon.ttf"; path = "../src/assets/fonts/icomoon.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -210,6 +212,7 @@
A5B0DC32C796429199378005 /* GraphikBold.otf */,
B71E1EFEDF144331897B3A36 /* GraphikMedium.otf */,
A9D99FE90A624E97BC20077B /* GraphikRegular.otf */,
4CCAD5E15981461E8057D087 /* icomoon.ttf */,
);
name = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -330,6 +333,7 @@
2DC0CD2396F04D26BFD6495F /* GraphikBold.otf in Resources */,
E1B4E41076BA4B0985B3FDD4 /* GraphikMedium.otf in Resources */,
7F743A933F0741D98EB5D161 /* GraphikRegular.otf in Resources */,
785BAE5F79A2433991F79D81 /* icomoon.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
1 change: 1 addition & 0 deletions ios/nubankclone/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<string>GraphikBold.otf</string>
<string>GraphikMedium.otf</string>
<string>GraphikRegular.otf</string>
<string>icomoon.ttf</string>
</array>
</dict>
</plist>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@types/styled-components-react-native": "^5.1.1",
"react": "17.0.2",
"react-native": "0.65.1",
"react-native-gesture-handler": "^1.10.3",
"react-native-vector-icons": "^8.1.0",
"styled-components": "^5.3.1"
},
Expand Down
49 changes: 5 additions & 44 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,55 +1,16 @@
import React from 'react';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {StatusBar} from 'react-native';
import Icon from 'react-native-vector-icons/AntDesign';
import IconMaterial from 'react-native-vector-icons/MaterialCommunityIcons';
import {CardOptions} from './components/CardOptions';

import {
Container,
Header,
Username,
HeaderLinks,
UserIcon,
HeaderContentButton,
HeaderButton,
} from './styles';
import {Dashboard} from './pages/Dashboard';

const App = () => {
return (
<>
<StatusBar backgroundColor="#820AD1" barStyle="light-content" />

<Container>
<Header>
<HeaderLinks>
<UserIcon>
<Icon name="user" color="#FFFFFF" size={20} />
</UserIcon>

<HeaderContentButton>
<HeaderButton>
<IconMaterial name="eye-outline" color="#FFFFFF" size={22} />
</HeaderButton>

<HeaderButton>
<Icon name="questioncircleo" color="#FFFFFF" size={20} />
</HeaderButton>

<HeaderButton>
<IconMaterial
name="email-plus-outline"
color="#FFFFFF"
size={22}
/>
</HeaderButton>
</HeaderContentButton>
</HeaderLinks>

<Username>Olá, Lucas</Username>
</Header>

<CardOptions />
</Container>
<GestureHandlerRootView>
<Dashboard />
</GestureHandlerRootView>
</>
);
};
Expand Down
Binary file added src/assets/fonts/icomoon.ttf
Binary file not shown.
235 changes: 235 additions & 0 deletions src/components/AccountContent/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
import React from 'react';
import {StyleSheet, View} from 'react-native';

import {
CardItem,
Container,
CardConta,
ContaDescription,
MoreOptionsContainer,
MoreOptionsContent,
MoreOptionsText,
HighligthPurple,
Description,
Row,
Title,
DescubraMaisTitle,
Price,
CardDescubraMais,
ButtonDescubraMais,
ButtonDescubraMaisText,
ContaFeatures,
ContaFeaturesItem,
IconBackground,
ContaFeaturesTitle,
MyCreditsCardsText,
MyCreditsCards,
} from './styles';

import Icon from 'react-native-vector-icons/AntDesign';
import IconEntypo from 'react-native-vector-icons/Entypo';
import IconMaterial from 'react-native-vector-icons/MaterialIcons';
import IconFeather from 'react-native-vector-icons/Feather';

import {Button} from '../Button';

export function Content() {
return (
<Container>
<CardConta>
<Row>
<Title>Conta</Title>
<IconMaterial name="keyboard-arrow-right" color="#727683" size={25} />
</Row>

<ContaDescription>
Uma conta completa, com função de débito, sem tarifa de manutenção e
que faz seu dinheiro render.
</ContaDescription>

<Button>Conhecer</Button>

<ContaFeatures>
<ContaFeaturesItem>
<IconBackground onPress={() => {}}>
<IconMaterial name="attach-money" color="#181818" size={20} />
</IconBackground>
<ContaFeaturesTitle>Pegar {'\n'} emprestado</ContaFeaturesTitle>
</ContaFeaturesItem>

<ContaFeaturesItem>
<IconBackground>
<IconFeather name="smartphone" color="#000" size={20} />
</IconBackground>
<ContaFeaturesTitle>Recarga de {'\n'} celular</ContaFeaturesTitle>
</ContaFeaturesItem>

<ContaFeaturesItem>
<IconBackground>
<Icon name="hearto" color="#181818" size={20} />
</IconBackground>
<ContaFeaturesTitle>Doação</ContaFeaturesTitle>
</ContaFeaturesItem>

<ContaFeaturesItem>
<IconBackground>
<Icon name="questioncircleo" color="#000" size={20} />
</IconBackground>
<ContaFeaturesTitle>Encontrar {'\n'} atalhos</ContaFeaturesTitle>
</ContaFeaturesItem>
</ContaFeatures>

<MyCreditsCards>
<IconFeather name="smartphone" color="#000" size={20} />
<MyCreditsCardsText>Meus cartões</MyCreditsCardsText>
</MyCreditsCards>

<MoreOptionsContainer>
<MoreOptionsContent>
<HighligthPurple>Não parcelou e se arrependeu?</HighligthPurple>
<MoreOptionsText>Parcele suas compras no app.</MoreOptionsText>
</MoreOptionsContent>

<MoreOptionsContent>
<MoreOptionsText>
Você tem <HighligthPurple>R$ 1.000,00</HighligthPurple>{' '}
disponíveis para empréstimo
</MoreOptionsText>
</MoreOptionsContent>

<MoreOptionsContent>
<MoreOptionsText>Salve seus amigos da burocracia.</MoreOptionsText>
<HighligthPurple>Faça um convite para o Nubank.</HighligthPurple>
</MoreOptionsContent>
</MoreOptionsContainer>
</CardConta>

<View style={styles.cardBorder}>
<CardItem>
<IconFeather
name="smartphone"
color="#000"
size={20}
style={{transform: [{scaleY: -1}]}}
/>
<Row>
<Title>Cartão de crédito</Title>
<IconMaterial
name="keyboard-arrow-right"
color="#727683"
size={25}
/>
</Row>

<Description>Fatura atual</Description>
<Price>R$ 212,00</Price>
<Description>Limite disponível de R$ 1.000,00</Description>
</CardItem>
</View>

<View style={styles.cardBorder}>
<CardItem style={styles.cardBorder}>
<IconMaterial name="attach-money" color="#181818" size={20} />
<Row>
<Title>Empréstimo</Title>
<IconMaterial
name="keyboard-arrow-right"
color="#727683"
size={25}
/>
</Row>

<Description>Valor disponível de até</Description>
<Description>R$ 1.000,00</Description>
</CardItem>
</View>

<View style={styles.cardBorder}>
<CardItem style={styles.cardBorder}>
<IconEntypo name="bar-graph" color="#181818" size={18} />
<Row>
<Title>Investimentos</Title>
<IconMaterial
name="keyboard-arrow-right"
color="#727683"
size={25}
/>
</Row>

<Description>
Pre-pa-ra! Cadastre-se agora e não fique de fora da revolução que
está por vir.
</Description>
</CardItem>
</View>

<View style={styles.cardBorder}>
<CardItem>
<Icon name="hearto" color="#181818" size={20} />
<Row>
<Title>Seguro de vida</Title>
<IconMaterial
name="keyboard-arrow-right"
color="#727683"
size={20}
/>
</Row>

<Description>
Conheça Nubank Vida: um seguro simples e que cabe no bolso.
</Description>
</CardItem>
</View>

<View style={styles.cardBorder}>
<CardItem>
<DescubraMaisTitle>Descubra mais</DescubraMaisTitle>

<MoreOptionsContainer>
<CardDescubraMais>
<Title>Conta PJ</Title>
<MoreOptionsText>
A gente te ajuda a gerenciar suas finanças de um jeito fácil
para fazer seu negócio acontecer.
</MoreOptionsText>

<ButtonDescubraMais>
<ButtonDescubraMaisText>Pedir como PJ</ButtonDescubraMaisText>
</ButtonDescubraMais>
</CardDescubraMais>

<CardDescubraMais>
<Title>Indique seus amigos</Title>
<MoreOptionsText>
Mostre aos seus amigos como é fácil ter uma vida sem burocracia.
</MoreOptionsText>

<ButtonDescubraMais>
<ButtonDescubraMaisText>Indicar amigos</ButtonDescubraMaisText>
</ButtonDescubraMais>
</CardDescubraMais>

<CardDescubraMais>
<Title>WhatsApp</Title>
<MoreOptionsText>
Pagamos seguros, rápidos e sem tarifa. A experiência Nubank sem
nem sair da conversa.
</MoreOptionsText>

<ButtonDescubraMais>
<ButtonDescubraMaisText>Quero Conhecer</ButtonDescubraMaisText>
</ButtonDescubraMais>
</CardDescubraMais>
</MoreOptionsContainer>
</CardItem>
</View>
</Container>
);
}

const styles = StyleSheet.create({
cardBorder: {
borderTopColor: '#F0F1F5',
borderTopWidth: 2,
},
});
Loading

0 comments on commit 2e90f68

Please sign in to comment.