Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 | 3x 10x 3x 3x 10x 3x 10x 3x 10x | import styled, { css } from 'styled-components';
export const Container = styled.div`
${({ theme }) => css`
width: 100%;
height: 26rem;
background-color: ${theme.colors.white};
display: grid;
place-items: center;
overflow: hidden;
position: relative;
border-radius: ${theme.border.radius};
border: 1px solid ${theme.colors.white};
& * {
cursor: pointer;
transition: 0.3s;
will-change: transform opacity;
}
&:hover {
box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.5);
${Content} {
opacity: 1;
}
${Label} {
transform: translateX(0%);
}
${Wrapper} {
opacity: 1;
transform: translateX(0%);
}
img {
transform: scale(1.1);
}
`}
`;
export const Hide = styled.a`
pointer-events: none;
`;
export const Content = styled.div`
${({ theme }) => css`
width: 100%;
height: 30%;
position: absolute;
opacity: 0;
bottom: 0;
display: flex;
align-items: end;
justify-content: space-between;
padding: ${theme.spacings.xsmall} ${theme.spacings.xsmall};
background: linear-gradient(
180deg,
transparent 0%,
rgba(0, 0, 0, 0.4) 30%,
rgba(0, 0, 0, 0.8) 69%,
#000 100%
);
`}
`;
export const Label = styled.h3`
${({ theme }) => css`
position: relative;
font-size: ${theme.font.sizes.medium};
color: ${theme.colors.white};
font-weight: ${theme.font.weights.bold};
transform: translateX(-20%);
`}
`;
export const Wrapper = styled.div`
${({ theme }) => css`
margin-left: ${theme.spacings.xsmall};
flex-shrink: 0;
opacity: 0;
z-index: 10;
transform: translateX(-40%);
`}
`;
|