index.tsx do Card:
import React from 'react';
import styled from 'styled-components';
import Favoritos from './Assets/Favoritos.svg';
import Sacola from './Assets/Sacola.svg';
export interface CardProps {
titulo: string;
subtitulo: string;
descricao: string;
autor: string;
descricaoPreco: string;
preco: string;
botaoComprar: string;
}
const CardStyles = styled.div`
background: #ffffff;
border-radius: 10px;
padding: 24px 32px;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
color: #eb9b00;
font-family: Arial, Helvetica, sans-serif;
width: 500px;
header {
display: flex;
justify-content: space-between;
}
footer {
display: flex;
justify-content: space-between;
align-items: center;
}
ul {
list-style-type: none;
display: flex;
}
li {
padding: 0 8px;
}
`;
const CardTitulo = styled.h1`
color: #eb9b00;
font-size: 32px;
font-weight: 700;
`;
const CardSubtitulo = styled.h3`
color: #002f52;
font-size: 18px;
font-weight: 700;
`;
const CardDesc = styled.p`
font-size: 14px;
color: #000000;
`;
const CardPreco = styled.h1`
font-size: 36px;
font-weight: 700;
color: #002f52;
`;
const CardButton = styled.button`
width: 170px;
background: #eb9b00;
border: none;
color: #ffffff;
padding: 16px 24px;
font-size: 24px;
font-weight: 700;
cursor: pointer;
&:hover {
background: #B87900;
}
`;
export const Card = ({
titulo,
subtitulo,
descricao,
autor,
descricaoPreco,
preco,
botaoComprar,
}: CardProps) => {
return (
<CardStyles>
<header>
<CardTitulo>{titulo}</CardTitulo>
<ul>
<li><img src={Sacola}/></li>
<li><img src={Favoritos}/></li>
</ul>
</header>
<CardSubtitulo>{subtitulo}</CardSubtitulo>
<CardDesc>{descricao}</CardDesc>
<CardDesc>{autor}</CardDesc>
<footer>
<div>
<CardDesc>{descricaoPreco}</CardDesc>
<CardPreco>{preco}</CardPreco>
</div>
<div>
<CardButton>{botaoComprar}</CardButton>
</div>
</footer>
</CardStyles>
);
};