:sprakles: add mapCardComponent
This commit is contained in:
parent
abbb5a3196
commit
6feac8022b
27
src/components/mapCard/MapCard.tsx
Normal file
27
src/components/mapCard/MapCard.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
27
src/components/mapCard/style.ts
Normal file
27
src/components/mapCard/style.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
`
|
||||
Loading…
x
Reference in New Issue
Block a user