-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathCC.js
More file actions
30 lines (25 loc) · 761 Bytes
/
CC.js
File metadata and controls
30 lines (25 loc) · 761 Bytes
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
import React from 'react'
const CreditCard = (props) => {
const num = 'XXXX XXXX XXXX '
const divstyle ={
backgroundColor:`${props.bgColor}`,
color:`${props.color}`,
display:'flex',
flexDirection: 'column',
borderRadius: '10px',
justifyContent: 'space-around',
width:'300px',
height:'130px',
alignItems:'center'
}
return (
<div className='card' style={divstyle} >
<b style={{marginLeft:'250px',color:'blue'}}>{props.type}</b>
<div>{num}{props.number.substr(-4)}</div>
<div>Expires {props.expirationMonth}/{props.expirationYear}</div>
<div>{props.bank}</div>
<div>{props.owner}</div>
</div>
)
}
export default CreditCard