react-native-swipeable icon indicating copy to clipboard operation
react-native-swipeable copied to clipboard

Not possible to center right button items?

Open andrzey opened this issue 7 years ago • 1 comments

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', }, });

andrzey avatar Feb 07 '18 13:02 andrzey

For people struggling with this, our friend gave a solution in another issue:

https://github.com/jshanson7/react-native-swipeable/issues/31#issuecomment-329297774

demarchisd avatar Aug 01 '18 20:08 demarchisd