diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-04 11:53:44 +0200 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-04 11:53:44 +0200 | 
| commit | e29e145b053a5b1f338cef8a0721e185e955cdc2 (patch) | |
| tree | 3391d241d53440caf910e67b105cab8c7496897e /src/components/atoms/loaders/spinner.module.scss | |
| parent | 21eb67ef5e59d36b996392f60b5045f152a64604 (diff) | |
chore: add a Spinner component
Diffstat (limited to 'src/components/atoms/loaders/spinner.module.scss')
| -rw-r--r-- | src/components/atoms/loaders/spinner.module.scss | 48 | 
1 files changed, 48 insertions, 0 deletions
| diff --git a/src/components/atoms/loaders/spinner.module.scss b/src/components/atoms/loaders/spinner.module.scss new file mode 100644 index 0000000..8d818a2 --- /dev/null +++ b/src/components/atoms/loaders/spinner.module.scss @@ -0,0 +1,48 @@ +@use "@styles/abstracts/functions" as fun; + +.wrapper { +  display: flex; +  flex-flow: row wrap; +  align-items: center; +  justify-content: center; +  gap: var(--spacing-2xs); +  margin: var(--spacing-md) 0; +} + +.ball { +  width: fun.convert-px(8); +  height: fun.convert-px(8); +  background: linear-gradient( +    to right, +    var(--color-primary-light) 0%, +    var(--color-primary-lighter) 100% +  ); +  border-radius: 50%; +  animation: spinner 1.4s infinite ease-in-out both; + +  &:first-child { +    animation-delay: -0.32s; +  } + +  &:nth-child(2) { +    animation-delay: -0.16s; +  } +} + +.text { +  margin-left: var(--spacing-xs); +  color: var(--color-primary-darker); +  text-align: center; +} + +@keyframes spinner { +  0%, +  80%, +  100% { +    transform: scale(0); +  } + +  40% { +    transform: scale(1); +  } +} | 
