-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCreditCard.js
75 lines (71 loc) · 1.81 KB
/
CreditCard.js
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import React from 'react'
import { View, Text } from 'react-native'
import TextInputMask from '../lib/text-input-mask'
import { textInputStype, container } from './styles'
export default class CreditCard extends React.Component {
constructor(props) {
super(props)
this.state = {
visamaster: '',
amex: '',
diners: ''
}
}
render() {
return (
<View style={container}>
<View style={container}>
<Text>Credit Card: Visa or Master</Text>
<TextInputMask
type={'credit-card'}
options={{
obfuscated: false,
issuer: 'visa-or-mastercard'
}}
value={this.state.visamaster}
onChangeText={text => {
this.setState({
visamaster: text
})
}}
style={textInputStype}
/>
</View>
<View style={container}>
<Text>Credit Card: Amex</Text>
<TextInputMask
type={'credit-card'}
options={{
obfuscated: false,
issuer: 'amex'
}}
value={this.state.amex}
onChangeText={text => {
this.setState({
amex: text
})
}}
style={textInputStype}
/>
</View>
<View style={container}>
<Text>Credit Card: Diners</Text>
<TextInputMask
type={'credit-card'}
options={{
obfuscated: false,
issuer: 'diners'
}}
value={this.state.diners}
onChangeText={text => {
this.setState({
diners: text
})
}}
style={textInputStype}
/>
</View>
</View>
)
}
}