-
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.
Merge pull request #36 from DiProjOrcestra/20-TelaMeusProjetos
20 tela meus projetos
- Loading branch information
Showing
9 changed files
with
159 additions
and
36 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,23 @@ | ||
import React from 'react'; | ||
import { Input } from 'react-native-elements'; | ||
import Icon from 'react-native-vector-icons/Ionicons'; | ||
import styles from './styles'; | ||
|
||
const SearchBar = ({changeSearchText, searchText, placeholder}) =>( | ||
<Input | ||
placeholder={placeholder} | ||
onChangeText={changeSearchText} | ||
value={searchText} | ||
containerStyle={styles.searchBar} | ||
inputContainerStyle={styles.searchBarContainer} | ||
inputStyle={styles.searchBarText} | ||
leftIcon={ | ||
<Icon name='ios-search' | ||
size={20} | ||
color='rgba(125,125,125, .5)' | ||
/> | ||
} | ||
/> | ||
); | ||
|
||
export default SearchBar; |
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,25 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
const styles = StyleSheet.create({ | ||
searchBar: { | ||
top: -125, | ||
width: 315, | ||
backgroundColor: '#ffffff', | ||
borderRadius: 8, | ||
paddingVertical: 5, | ||
shadowOffset: {height: 1, width: 0}, | ||
shadowColor: '#000000', | ||
shadowOpacity: .1, | ||
shadowRadius: 2.22, | ||
elevation: 3 | ||
}, | ||
searchBarText: { | ||
marginLeft: 10, | ||
fontFamily: 'Fjalla-One' | ||
}, | ||
searchBarContainer: { | ||
borderBottomWidth: 0 | ||
}, | ||
}); | ||
|
||
export default styles; |
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
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,47 @@ | ||
import React, { useState } from 'react'; | ||
import { View, Text, FlatList } from 'react-native'; | ||
import Project from '../../components/projectCard'; | ||
import Header from '../../components/Header'; | ||
import SearchBar from '../../components/searchBar'; | ||
import { Button } from 'react-native-elements'; | ||
import Icon from 'react-native-vector-icons/Ionicons'; | ||
|
||
import styles from './styles'; | ||
|
||
const Projects = () => { | ||
|
||
var [searchText, changeSearchText] = useState(''); | ||
|
||
var mock = [ | ||
{ | ||
projectName: 'Plataforma educacional gamificada', | ||
ownerName: 'Jason Fried', | ||
avatar: '../../../assets/icon.png', | ||
labels: ['Rails', 'Ruby on Rails'] | ||
}]; | ||
|
||
|
||
mock = mock.filter(project => {return project.projectName.toLowerCase().includes(searchText.toLowerCase())}); | ||
return ( | ||
<View style={styles.container}> | ||
<Header title="Meus Projetos" /> | ||
<SearchBar placeholder="Procurar projeto" | ||
changeSearchText={changeSearchText} | ||
searchText={searchText} | ||
/> | ||
<Text style={styles.projectAvailable}>MEUS PROJETOS</Text> | ||
<View style={styles.projectHeight}> | ||
<FlatList | ||
keyExtractor={(item, index) => index.toString()} | ||
data={mock} | ||
renderItem={(project) => (<Project project={project}/>)} | ||
style={styles.projectList} | ||
showsVerticalScrollIndicator={false} | ||
/> | ||
</View> | ||
<Button type='solid' title='ADICIONAR PROJETO' titleStyle={styles.buttonText} buttonStyle={styles.button} /> | ||
</View> | ||
) | ||
} | ||
|
||
export default Projects; |
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,44 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
alignItems: 'center', | ||
backgroundColor: '#F5F7FB' | ||
}, | ||
projectList: { | ||
top: -100, | ||
flex: 1, | ||
}, | ||
projectHeight: { | ||
height: 325 | ||
}, | ||
button: { | ||
height: 55, | ||
width: 300, | ||
backgroundColor: '#7AC14E', | ||
borderRadius: 8, | ||
zIndex: 4, | ||
shadowOffset: {width: 10, height: 10}, | ||
shadowColor: 'black', | ||
shadowOpacity: .8, | ||
position: 'absolute', | ||
bottom: 30, | ||
left: -150 | ||
}, | ||
buttonText: { | ||
fontFamily: 'Fjalla-One' | ||
}, | ||
projectAvailable: { | ||
top: -100, | ||
alignSelf: 'flex-start', | ||
left: 30, | ||
color: 'rgba(56, 79, 125, .8)', | ||
fontSize: 13, | ||
letterSpacing: 1, | ||
lineHeight: 16, | ||
fontFamily: 'Fjalla-One' | ||
}, | ||
}); | ||
|
||
export default styles; |
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