add preloader block

This commit is contained in:
igoradamenko
2018-03-04 00:52:22 +03:00
parent 53f11adb71
commit 41299c4d7e
4 changed files with 58 additions and 0 deletions
@@ -0,0 +1,35 @@
.preloader__bounce {
display: inline-block;
width: 10px;
height: 10px;
margin-right: 3px;
background-color: #333;
border-radius: 100%;
animation: preloaderBounce 1.4s infinite ease-in-out both;
&:first-child {
animation-delay: -.32s;
}
&:nth-child(2) {
animation-delay: -.16s;
}
&:last-child {
margin-right: 0;
}
@keyframes preloaderBounce {
0% {
transform: scale(0);
}
40% {
transform: scale(1);
}
80%, 100% {
transform: scale(0);
}
}
}
+5
View File
@@ -0,0 +1,5 @@
export { default } from './preloader';
require('./preloader.scss');
require('./__bounce/preloader__bounce.scss');
@@ -0,0 +1,13 @@
import { h, Component } from 'preact';
export default class Preloader extends Component {
render(props, state) {
return (
<div className={b('preloader', props)}>
<div className="preloader__bounce"/>
<div className="preloader__bounce"/>
<div className="preloader__bounce"/>
</div>
);
}
}
@@ -0,0 +1,5 @@
.preloader {
width: 60px;
text-align: center;
font-size: 0;
}