add spinner loading component

This commit is contained in:
NCanggoro 2023-09-27 21:55:21 +07:00
parent 19f7f6f07b
commit cd680de68b
3 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,6 @@
import './style.css'
export default function SpinnerLoading() {
return (
<div className={'spinner'} style={{ display: 'inline-block'}}></div>
)
}

View File

@ -0,0 +1,16 @@
@keyframes spinner {
to {transform: rotate(360deg);}
}
.spinner:before {
content: '';
box-sizing: border-box;
position: relative;
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
border: 2px solid #ccc;
border-top-color: #000;
animation: spinner .7s linear infinite;
}

View File

@ -4,10 +4,14 @@ import DefaultSeparator from "./Separator/Default";
import Footer from './Footer/'; import Footer from './Footer/';
import CustomInterweave from "./CustomInterweave"; import CustomInterweave from "./CustomInterweave";
import SpinnerLoading from "./Loading/Spinner";
export { export {
Header, Header,
SeparatorWithAnchor, SeparatorWithAnchor,
DefaultSeparator, DefaultSeparator,
Footer, Footer,
CustomInterweave CustomInterweave,
SpinnerLoading,
} }