1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

added placeholders for boris stats

This commit is contained in:
Fedor Katurov 2021-09-22 15:55:45 +07:00
parent c6aa2139e0
commit 372e016e3d
5 changed files with 104 additions and 48 deletions

View file

@ -8,6 +8,7 @@ export interface PlaceholderProps {
color?: string;
active?: boolean;
loading?: boolean;
className?: string;
}
const Placeholder: FC<PlaceholderProps> = ({
@ -17,10 +18,11 @@ const Placeholder: FC<PlaceholderProps> = ({
active,
children,
loading = true,
className,
}) => {
return active ? (
<div
className={classNames(styles.placeholder, { [styles.loading]: loading })}
className={classNames(styles.placeholder, { [styles.loading]: loading }, className)}
style={{ height, color, width }}
/>
) : (

View file

@ -9,6 +9,7 @@
opacity: 0.05;
}
}
.placeholder {
height: 1em;
width: 120px;
@ -16,6 +17,7 @@
border-radius: 1em;
position: relative;
overflow: hidden;
display: inline-flex;
&::after {
content: ' ';