Created
August 29, 2018 20:40
-
-
Save mikaoelitiana/7b416cdc5ac96ad0713cd54fd09691be to your computer and use it in GitHub Desktop.
custom nav header with react-native-elements
This file contains hidden or 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
import React, { Component } from 'react' | |
import { View, TextInput, Text } from 'react-native' | |
import { Header } from 'react-native-elements' | |
class MyScreen extends Component { | |
render () { | |
return ( | |
<View> | |
<Header | |
leftComponent={{ icon: 'menu', color: '#fff' }} | |
centerComponent={ | |
<View> | |
<TextInput | |
placeholder={'Search'} | |
style={{ width: 250, backgroundColor: "white", paddingHorizontal: 20, paddingVertical: 5 }}/> | |
</View> | |
} | |
rightComponent={{ icon: 'search', color: '#fff' }} | |
/> | |
<View> | |
<Text>Lorem ipsum...</Text> | |
</View> | |
</View> | |
) | |
} | |
} | |
export default MyScreen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment