I have this screen on my app which corresponds to this code
render() {
return (
<View style={styles.containerStyle}>
<Chrono style={styles.svgStyle} fill="blue"/>
<Button style={styles.buttonStyle}>Add</Button>
</View>
)
}
}
const styles = {
containerStyle: {
flex: 1,
flexDirection: 'column',
marginBottom: 200,
justifyContent: 'space-around'
},
svgStyle: {
height: 180,
width: 180
},
buttonStyle: {
height: 20,
width: 100,
backgroundColor: '#00aeef',
borderWidth: 5,
borderRadius: 15
}
};
I would like the chrono to be positioned in the center and the button at the end of the column (screen). I am struggling to do that with flexbox as I understand there is no align-self property for aligning accross the main axis.
What is the good way to go to achieve this ?
----EDIT---- the component(called Starter) above is wrapped in a view with the following style :
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Starter />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center'
},
});