-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathDriverCard.js
More file actions
40 lines (38 loc) · 866 Bytes
/
DriverCard.js
File metadata and controls
40 lines (38 loc) · 866 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
31
32
33
34
35
36
37
38
39
40
import React from 'react';
import Rating from './Rating';
function DriverCard({ name, rating, img, car }) {
return (
<div
style={{
backgroundColor: '#455EB5',
color: 'white',
width: 'full',
borderRadius: '10px',
padding: '15px',
margin: '15px',
display: 'flex',
justifyContent:'center',
alignItems: 'center',
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.2)',
}}
>
<img
src={img}
alt={name}
style={{
borderRadius: '50%',
width: '100px',
height: '100px',
marginRight: '15px',
objectFit: 'cover',
}}
/>
<div>
<h3>{name}</h3>
<Rating>{rating}</Rating>
<p>{car.model} - {car.licensePlate}</p>
</div>
</div>
);
}
export default DriverCard;