AutorÃa | Ultima modificación | Ver Log |
import React from 'react'
import { Link } from 'react-router-dom'
import { styled } from 'styled-components'
const StyledLink = styled(Link)`
cursor: pointer;
padding: 10px;
display: flex;
justify-content: space-between;
width: 100%;
&:hover {
background-color: rgba(0, 0, 0, 0.08);
}
span {
font-size: 0.9rem;
font-weight: 600;
color: gray;
&:last-child {
font-weight: bold !important;
color: #0a66c2 !important;
}
}
`
const StatItem = ({ title = '', number = 0, url = '' }) => {
return (
<StyledLink to={url} onClick={(e) => !url && e.preventDefault()}>
<span>{title}</span>
<span>{number}</span>
</StyledLink>
)
}
export default StatItem