1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

added fake profile stats

This commit is contained in:
Fedor Katurov 2021-10-01 16:12:27 +07:00
parent a808045a7d
commit 3cdc382457
4 changed files with 75 additions and 1 deletions

View file

@ -0,0 +1,21 @@
import React, { FC } from 'react';
import styles from './styles.module.scss';
interface Props {}
const Row: FC<{ count: number; title: string }> = ({ count, title }) => (
<div className={styles.row}>
<div className={styles.counter}>{count > 999 ? '999+' : count}</div>
<div className={styles.title}>{title}</div>
</div>
);
const ProfilePageStats: FC<Props> = () => (
<div className={styles.wrap}>
<Row count={9} title="лет в бункере" />
<Row count={99} title="постов" />
<Row count={99999} title="комментариев" />
</div>
);
export { ProfilePageStats };

View file

@ -0,0 +1,43 @@
@import "~/styles/variables";
.wrap {
@include outer_shadow;
padding: $gap;
background: $content_bg;
border-radius: $radius;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
grid-row-gap: $gap;
grid-column-gap: $gap;
grid-auto-flow: row;
& > .row:not(:last-child) {
margin-bottom: $gap;
}
}
.row {
width: 100%;
background-color: lighten($content_bg, 4%);
border-radius: $radius;
padding: $gap;
box-sizing: border-box;
height: 100%;
}
.counter {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font: $font_32_bold;
height: 60px;
}
.title {
font: $font_12_semibold;
text-align: center;
word-wrap: break-word;
opacity: 0.5;
}