This repository was archived by the owner on Aug 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCustomButton.js
More file actions
56 lines (51 loc) · 1.66 KB
/
CustomButton.js
File metadata and controls
56 lines (51 loc) · 1.66 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
50
51
52
53
54
55
56
import React, { Component } from 'react';
import {AsyncStorage, StyleSheet, View, ScrollView, FlatList, TouchableOpacity, Image, RefreshControl, Alert, TouchableHighlight} from 'react-native';
import { Container, Content, Card, CardItem, Text, Body, Button, ListItem, CheckBox, Item, Input, Label } from 'native-base';
import Ionicon from 'react-native-vector-icons/Ionicons';
import Spinner from 'react-native-loading-spinner-overlay';
// import AppIntro from 'react-native-app-intro';
import Swiper from 'react-native-swiper';
import RNRestart from 'react-native-restart'; // Import package from node modules
import ElevatedView from 'react-native-elevated-view'
export default class CustomButton extends Component {
componentDidMount() {
}
constructor(props) {
super(props);
this.state = {
loading: false
}
}
render() {
let disabled = this.props.disabled;
return (
<ElevatedView style={this.props.style} elevation={16}>
<Button disabled={disabled} onPress={() => this.props.onPress()} rounded
style={[disabled ? styles.lineButtonDisabled : styles.lineButton, this.props.buttonStyle]}>
<Text style={styles.lineButtonText}>{this.props.text}</Text></Button>
</ElevatedView>
);
}
}
const styles = StyleSheet.create({
lineButton: {
paddingRight: 20,
paddingLeft: 20,
borderRadius: 32,
backgroundColor: '#0157F8',
width: '100%',
},
lineButtonDisabled: {
paddingRight: 20,
paddingLeft: 20,
borderRadius: 32,
backgroundColor: '#aaa',
width: '100%',
},
lineButtonText: {
color: '#fff',
fontWeight: 'bold',
width: '100%',
textAlign: 'center',
}
})