:sprakles: add mapCardComponent

This commit is contained in:
José Corte 2022-05-06 12:41:42 -03:00
parent abbb5a3196
commit 6feac8022b
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,27 @@
import React from 'react'
import Image from 'next/image'
import { MapCardView } from './style'
interface MapCardInterface {
title: string,
subtitle: string,
statistic: string,
imgSource: string,
}
export default function MapCard({ title, subtitle, statistic, imgSource }: MapCardInterface) {
return (
<MapCardView>
<Image src={imgSource} width={125} height={125} />
<div>
<h4>{title}</h4>
<span>{subtitle}</span>
<article>
<Image src="/graphLineIcon.svg" width={20} height={20} />
<p>{statistic}</p>
</article>
</div>
</MapCardView>
)
}

View File

@ -0,0 +1,27 @@
import styled from 'styled-components'
export const MapCardView = styled.figure`
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
margin-right: 25px;
span {
margin-bottom: 25px;
}
div {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
article {
display: flex;
}
}
`