-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.js
26 lines (22 loc) · 782 Bytes
/
Card.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
import React from "react";
const Card = (props) => {
let icon = null;
if (props.symbol === 'ace') {
icon = 'https://image.flaticon.com/icons/svg/105/105223.svg';
} else if (props.symbol === 'clover') {
icon = 'https://image.flaticon.com/icons/svg/1496/1496341.svg';
} else if (props.symbol === 'diamond') {
icon = 'https://image.flaticon.com/icons/svg/148/148905.svg';
} else {
icon = 'https://image.flaticon.com/icons/svg/148/148836.svg';
}
return (
<div className="Card">
<p className="Paragraph">
<b>{props.number}</b>
</p>
<img className="Center" src={icon} alt="card symbol" height="50px" width="50px"></img>
</div>
);
}
export default Card;