Notes
Notes
the Image.
const Container = styled.div`
flex: 1;
`;
const Image = styled.img`
width: 100%;
`;
* for make the images same high and make images lok good on that size we apply
object fit.
* we put info container just top of the image and center the data. don't think
complicated it is like putting another paper.
const Container = styled.div`
flex: 1;
margin: 3px;
height: 70vh;
position: relative;
border: 2px solid red;
`;
const Image = styled.img`
width: 100%;
height: 100%;
border: 2px solid orange;
object-fit: cover;
`;
const Info = styled.div`
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
border: 1px solid yellow;
`;
* map the item list first then you can create with the necessary information. It
will be easier.
* min width is used when the items are too big, and we need to set the limit width
for those items.
* when we want item to be shown when the other item is hoverd, we can make opacity
0 and apply opacity
when other item is hovered.
* in order to apply flex-wrap: wrap, we need to give the width to the child
components.
* vm and vh
A % length is relative to local context (containing element) width, while a vw
length is relative to the full width of the browser window.
*for not making things complicated, you can make separate components instead of
using PROPS everywhere.
It will make components more complicated instead of simplicity.
DO NOT WORRY TO MAKE COMPONENTS.