Loader
A simple reusable loader in React
export default function Loader({ show }) {
return show ? <div className="loader"></div> : null;
}
/* Loader */
.loader {
border: 10px solid #eef0f1;
border-top: 10px solid #3b49df;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}