react-native-swipeable
react-native-swipeable copied to clipboard
Not possible to center right button items?
I have a simple component that I want to center vertically and horizontally with flex-box. Is this not possible? When I add alignItems: center
the buttons disappear to the right. I dont se any example where you have vertically and horizontally centered any items. Is this just not possible?
My small component:
const Item = (props) => { return ( <TouchableHighlight style={styles.container}> <Icon name={props.icon} size={50} color="#900" /> </TouchableHighlight> ); };
And my simple style:
const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center, justifyContent: 'center', }, });
For people struggling with this, our friend gave a solution in another issue:
https://github.com/jshanson7/react-native-swipeable/issues/31#issuecomment-329297774