Added settings button in ActionsDashboardItem

This commit is contained in:
Arnaud Vergnet 2020-04-04 16:31:24 +02:00
parent cacfb2862c
commit 2d26f2c395

View file

@ -20,6 +20,8 @@ class ActionsDashBoardItem extends React.PureComponent<Props> {
openDrawer = () => this.props.navigation.openDrawer(); openDrawer = () => this.props.navigation.openDrawer();
gotToSettings = () => this.props.navigation.navigate("SettingsScreen");
render() { render() {
return ( return (
<Card style={{ <Card style={{
@ -31,10 +33,17 @@ class ActionsDashBoardItem extends React.PureComponent<Props> {
icon="information" icon="information"
mode="contained" mode="contained"
onPress={this.openDrawer} onPress={this.openDrawer}
style={styles.button} style={styles.servicesButton}
> >
PLUS DE SERVICES PLUS DE SERVICES
</Button> </Button>
<Button
icon="settings"
mode="contained"
onPress={this.gotToSettings}
style={styles.settingsButton}
compact
/>
</Card.Content> </Card.Content>
</Card> </Card>
); );
@ -58,8 +67,12 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
flexDirection: 'row', flexDirection: 'row',
}, },
button: { servicesButton: {
marginLeft: 'auto', marginLeft: 'auto',
marginRight: 5,
},
settingsButton: {
marginLeft: 5,
marginRight: 'auto', marginRight: 'auto',
} }
}); });