Created
July 8, 2018 17:56
-
-
Save ThakurBallary/549a39cd2fb5b738e852c8d2b832aadc to your computer and use it in GitHub Desktop.
react-native-btr-demo
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, Text, StyleSheet } from 'react-native'; | |
import { IconPicker } from 'react-native-btr'; | |
class IconPickerDemo extends Component { | |
static navigationOptions = { | |
title: 'IconPicker' | |
} | |
state = { | |
selectedIcon: '' | |
} | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Text>Selected Icon = {this.state.selectedIcon}</Text> | |
<View style={styles.wrapper}> | |
<IconPicker | |
selectedIcon={this.state.selectedIcon} | |
onSelect={selectedIcon => this.setState({ selectedIcon })} | |
/> | |
</View> | |
<Text> Scroll Horizontally for more Icons </Text> | |
</View> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
}, | |
wrapper: { | |
backgroundColor: '#fff', | |
marginVertical: 10 | |
} | |
}); | |
export default IconPickerDemo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment