mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
changed profile stats appearance
This commit is contained in:
parent
33c17616e9
commit
fb8ad315c0
11 changed files with 1033 additions and 125 deletions
21
src/components/common/StatsRow/index.tsx
Normal file
21
src/components/common/StatsRow/index.tsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
import React, { FC } from 'react';
|
||||
import { Placeholder } from '~/components/placeholders/Placeholder';
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
const StatsRow: FC<{ isLoading: boolean; label: string }> = ({ isLoading, label, children }) => (
|
||||
<li className={styles.row}>
|
||||
{isLoading ? (
|
||||
<>
|
||||
<Placeholder active={isLoading} loading className={styles.label} />
|
||||
<Placeholder active={isLoading} loading className={styles.value} width="24px" />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<div className={styles.label}>{label}</div>
|
||||
<div className={styles.value}>{children}</div>
|
||||
</>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
|
||||
export { StatsRow };
|
23
src/components/common/StatsRow/styles.module.scss
Normal file
23
src/components/common/StatsRow/styles.module.scss
Normal file
|
@ -0,0 +1,23 @@
|
|||
@import '~/styles/variables.scss';
|
||||
|
||||
.row {
|
||||
@include row_shadow;
|
||||
color: #aaaaaa;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
font: $font_12_regular;
|
||||
line-height: 24px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.label {
|
||||
flex: 1;
|
||||
margin-right: $gap;
|
||||
}
|
||||
|
||||
.value {
|
||||
float: right;
|
||||
color: white;
|
||||
font: $font_12_semibold;
|
||||
line-height: 24px;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue