Last active
April 27, 2017 09:31
-
-
Save khatv911/131c0b4c895b0285e015ff4ece54ab44 to your computer and use it in GitHub Desktop.
Section Header
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
import React, {Component} from 'react'; | |
import {View, StyleSheet} from 'react-native'; | |
import {Icon, Text} from 'react-native-elements'; | |
const SectionHeader = (section, index, isActive) => <View style={styles.container}> | |
<Text h4>{section.title}</Text> | |
<View style={styles.right}> | |
<Text style={{ | |
marginRight: 5, | |
fontSize: 18 | |
}}>10</Text> | |
<Icon | |
name={isActive | |
? 'arrow-down' | |
: 'arrow-right'} | |
type='simple-line-icon' | |
size={25}/> | |
</View> | |
</View> | |
const styles = StyleSheet.create({ | |
container: { | |
flexDirection: 'row', | |
justifyContent: 'space-between', | |
alignItems: 'center', | |
borderBottomWidth: 0.75, | |
padding: 10 | |
}, | |
left: {}, | |
right: { | |
justifyContent: 'space-between', | |
flexDirection: 'row', | |
alignItems: 'center' | |
} | |
}); | |
export default SectionHeader; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment