-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGridView.js
108 lines (105 loc) · 2.38 KB
/
GridView.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import React from "react";
import styled from "styled-components";
import Product from "./Product";
const GridView = ({ products }) => {
return (
<Wrapper className="section">
<div className="container grid grid-three-column">
{products.map((curElem) => {
return <Product key={curElem.id} {...curElem} />;
})}
</div>
</Wrapper>
);
};
const Wrapper = styled.section`
padding: 9rem 0;
.container {
max-width: 120rem;
}
.grid {
gap: 3.2rem;
}
figure {
width: auto;
display: flex;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
transition: all 0.5s linear;
&::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 0%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
transition: all 0.2s linear;
cursor: pointer;
}
&:hover::after {
width: 100%;
}
&:hover img {
transform: scale(1.2);
}
img {
max-width: 90%;
margin-top: 1.5rem;
height: 20rem;
transition: all 0.2s linear;
}
.caption {
position: absolute;
top: 5%;
right: 5%;
text-transform: uppercase;
background-color: ${({ theme }) => theme.colors.bg};
color: ${({ theme }) => theme.colors.helper};
padding: 0.8rem 2rem;
font-size: 1.2rem;
border-radius: 2rem;
}
}
.card {
background-color: ${({ theme }) => theme.colors.white};
border-radius: 1rem;
.card-data {
padding: 0 1rem;
}
.card-data-flex {
margin: 2rem 0;
display: flex;
justify-content: space-between;
align-items: center;
}
.card-data--price {
color: ${({ theme }) => theme.colors.helper};
}
h3 {
color: ${({ theme }) => theme.colors.text};
text-transform: capitalize;
}
.btn {
margin: 2rem auto;
background-color: rgb(0 0 0 / 0%);
border: 0.1rem solid rgb(98 84 243);
display: flex;
justify-content: center;
align-items: center;
&:hover {
background-color: rgb(98 84 243);
}
&:hover a {
color: #fff;
}
a {
color: rgb(98 84 243);
font-size: 1.4rem;
}
}
}
`;
export default GridView;