Adding new Admin UI. Updating Fredy to V3.0.0 as it has been a large rewrite. Thanks for all contributions and help on the way!
This commit is contained in:
Christian Kellner
2021-01-21 16:09:23 +01:00
committed by GitHub
parent 8185bfe818
commit b2847f6834
124 changed files with 9768 additions and 1495 deletions

View File

@@ -0,0 +1,29 @@
import React from 'react';
import './Placeholder.less';
function getPlaceholder(rowCount, className) {
const rows = [];
for (let i = 0; i < rowCount; i++) {
rows.push(<div className="place__line" key={i} />);
}
const clazz = `place ${className == null ? '' : className}`;
return (
<div className={clazz}>
<div className="place__circle" />
<div className="place__place_lines_wrapper">{rows}</div>
</div>
);
}
export default function Placeholder({ rows = 3, ready = false, children, customPlaceholder, className }) {
if (!ready) {
if (customPlaceholder != null) {
return customPlaceholder;
}
return getPlaceholder(rows, className);
}
return children;
}

View File

@@ -0,0 +1,36 @@
.place {
height: 100%;
width: 100%;
display:flex;
&__place_lines_wrapper{
width:100%;
}
&__line {
height: 10px;
margin: 10px;
animation: pulse 1s infinite ease-in-out;
}
&__circle {
height: 4rem;
width: 5rem;
margin: 10px;
border-radius: 360px;
animation: pulse 1s infinite ease-in-out;
}
}
@keyframes pulse {
0% {
background-color: rgba(165, 165, 165, 0.1)
}
50% {
background-color: rgba(165, 165, 165, 0.3)
}
100% {
background-color: rgba(165, 165, 165, 0.1)
}
}