Skip to content

Commit

Permalink
finalizando listagem dos itens
Browse files Browse the repository at this point in the history
  • Loading branch information
AfonsoMachado committed Aug 9, 2020
1 parent eafd98a commit 23b6242
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 5 deletions.
5 changes: 3 additions & 2 deletions proffy-mobile/src/components/TeacherItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ function TeacherItem() {
</Text>

<View style={styles.buttonsContainer}>
<RectButton style={styles.favoriteButton}>
<Image source={heartOutlineIcon}/>
<RectButton style={[styles.favoriteButton, styles.favorited]}>
{/* <Image source={heartOutlineIcon}/> */}
<Image source={unfavoriteIcon}/>
</RectButton>
<RectButton style={styles.contactButton}>
<Image source={whatsappIcon}/>
Expand Down
4 changes: 4 additions & 0 deletions proffy-mobile/src/components/TeacherItem/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ const styles = StyleSheet.create({
marginRight: 8
},

favorited: {
backgroundColor: '#e33d3d'
},

contactButton: {
backgroundColor: '#04d361',
flex: 1,
Expand Down
15 changes: 14 additions & 1 deletion proffy-mobile/src/pages/Favorites/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
import React from 'react';
import { View } from 'react-native';
import { View, ScrollView } from 'react-native';

import styles from './styles';
import PageHeader from '../../components/PageHeader';
import TeacherItem from '../../components/TeacherItem';

function Favorites() {
return (
<View style={styles.container}>
<PageHeader title="Meus proffys favoritos" />

<ScrollView
style={styles.teacherList}
contentContainerStyle={{
paddingHorizontal: 16,
paddingBottom: 16,
}}
>
<TeacherItem />
<TeacherItem />
<TeacherItem />
</ScrollView>
</View>
)
}
Expand Down
4 changes: 4 additions & 0 deletions proffy-mobile/src/pages/Favorites/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f0f0f7'
},

teacherList: {
marginTop: -60,
}
})

Expand Down
16 changes: 14 additions & 2 deletions proffy-mobile/src/pages/TeacherList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { View } from 'react-native'
import { View, ScrollView } from 'react-native'

import styles from './styles'
import PageHeader from '../../components/PageHeader'
Expand All @@ -10,7 +10,19 @@ function TeacherList() {
<View style={styles.container}>
<PageHeader title="Proffys disponíveis" />

<TeacherItem />
{/* TELA COM SCROLL */}
<ScrollView
style={styles.teacherList}
contentContainerStyle={{
paddingHorizontal: 16,
paddingBottom: 16,
}}
>
<TeacherItem />
<TeacherItem />
<TeacherItem />
</ScrollView>

</View>
)

Expand Down
5 changes: 5 additions & 0 deletions proffy-mobile/src/pages/TeacherList/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f0f0f7'
},

// colocando para sobrepo o cabeçalho
teacherList: {
marginTop: -60,
}
})

Expand Down

0 comments on commit 23b6242

Please sign in to comment.