Browse Source

Added settings button in ActionsDashboardItem

Arnaud Vergnet 4 years ago
parent
commit
2d26f2c395
1 changed files with 15 additions and 2 deletions
  1. 15
    2
      components/Home/ActionsDashboardItem.js

+ 15
- 2
components/Home/ActionsDashboardItem.js View File

@@ -20,6 +20,8 @@ class ActionsDashBoardItem extends React.PureComponent<Props> {
20 20
 
21 21
     openDrawer = () => this.props.navigation.openDrawer();
22 22
 
23
+    gotToSettings = () => this.props.navigation.navigate("SettingsScreen");
24
+
23 25
     render() {
24 26
         return (
25 27
             <Card style={{
@@ -31,10 +33,17 @@ class ActionsDashBoardItem extends React.PureComponent<Props> {
31 33
                         icon="information"
32 34
                         mode="contained"
33 35
                         onPress={this.openDrawer}
34
-                        style={styles.button}
36
+                        style={styles.servicesButton}
35 37
                     >
36 38
                         PLUS DE SERVICES
37 39
                     </Button>
40
+                    <Button
41
+                        icon="settings"
42
+                        mode="contained"
43
+                        onPress={this.gotToSettings}
44
+                        style={styles.settingsButton}
45
+                        compact
46
+                    />
38 47
                 </Card.Content>
39 48
             </Card>
40 49
         );
@@ -58,8 +67,12 @@ const styles = StyleSheet.create({
58 67
         flex: 1,
59 68
         flexDirection: 'row',
60 69
     },
61
-    button: {
70
+    servicesButton: {
62 71
         marginLeft: 'auto',
72
+        marginRight: 5,
73
+    },
74
+    settingsButton: {
75
+        marginLeft: 5,
63 76
         marginRight: 'auto',
64 77
     }
65 78
 });

Loading…
Cancel
Save