[DEV] add common spiner (beta)

This commit is contained in:
Edouard DUPIN 2023-01-05 22:26:26 +01:00
parent c6016de0ed
commit c845ab6847
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<div>
<svg class="spinner" viewBox="0 0 50 50">
<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle>
</svg>
</div>

View File

@ -0,0 +1,32 @@
.spinner {
animation: rotate 2s linear infinite;
z-index: 2;
width: 50px;
height: 50px;
& .path {
stroke: rgb(31, 31, 31);
stroke-linecap: round;
animation: dash 1.5s ease-in-out infinite;
}
}
@keyframes rotate {
100% {
transform: rotate(360deg);
}
}
@keyframes dash {
0% {
stroke-dasharray: 1, 150;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -35;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -124;
}
}

View File

@ -0,0 +1,15 @@
/** @file
* @author Edouard DUPIN
* @copyright 2023, Edouard DUPIN, all right reserved
* @license MPL-2 (see license file)
*/
import { Component} from '@angular/core';
@Component({
selector: 'spiner',
templateUrl: './spiner.html',
styleUrls: ['./spiner.less'],
})
export class SpinerComponent {
}