-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoutineChoiceButton.js
More file actions
49 lines (48 loc) · 1.17 KB
/
Copy pathRoutineChoiceButton.js
File metadata and controls
49 lines (48 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React, { Component } from "react";
import { Button, Text, Icon, View } from "@shoutem/ui";
import Swipeout from "react-native-swipeout";
class RoutineChoiceButton extends React.Component {
render() {
let swipeoutBtns = [
{
text: "Delete",
backgroundColor: "red",
underlayColor: "rgba(0, 0, 0, 1, 0.6)",
onPress: () => {
this.props.removeRoutine(this.props.index);
}
}
];
return (
<View
style={{
width: "100%",
borderColor: "black",
borderWidth: 2,
marginVertical: 3
}}
>
<Swipeout
right={swipeoutBtns}
autoClose={true}
backgroundColor="transparent"
>
<Button
onPress={() => this.props.onPressChooseRoutine(this.props.index)}
style={{
width: "100%"
}}
>
<Text
styleName="bold"
style={{ fontSize: 40, textAlign: "center" }}
>
{this.props.name}
</Text>
</Button>
</Swipeout>
</View>
);
}
}
export default RoutineChoiceButton;