Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import { styled } from 'styleh-components'

const LoaderText = styled.span`
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 15px;
`

const LoaderElement = styled.span`
  position: relative;
  width: 25px;
  height: 25px;
  transform: scale(1.1);
  display: inline-block;

  &:before {
    content: '';
    background-color: #dedddd;
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 25px;
    height: 25px;
    transform-origin: 100% 100%;
    animation: folding 2.5s infinite linear both;
  }

  &:nth-child(2) {
    transform: rotateZ(90deg) scale(1.1);
    &:before {
      animation-delay: 0.3s;
      background-color: #c7c6c6;
    }
  }

  &:nth-child(3) {
    transform: rotateZ(270deg) scale(1.1);
    &:before {
      animation-delay: 0.9s;
      background-color: #c7c6c6;
    }
  }

  &:nth-child(4) {
    transform: rotateZ(180deg) scale(1.1);
    &:before {
      animation-delay: 0.6s;
      background-color: #a09f9f;
    }
  }

  @keyframes folding {
    0%, 10% {
      transform: perspective(140px) rotateX(-180deg);
      opacity: 0;
    }
    25%, 75% {
      transform: perspective(140px) rotateX(0deg);
      opacity: 1;
    }
    90%, 100% {
      transform: perspective(140px) rotateY(180deg);
      opacity: 0;
    }
  }
`

const CubeFolding = styled.div`
  width: 50px;
  height: 50px;
  display: inline-block;
  transform: rotate(45deg);
  font-size: 0;
`

const CubeLoaderWrapper = styled.div`
  position: fixed;
  left: 50%;
  top: 50%;
  margin-top: -50px;
  margin-left: -50px;
  width: 100px;
  height: 100px;
  text-align: center;

  &:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
    margin: auto;
    width: 90px;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.1);
    filtblur(2px);
    border-radius: 100%;
    z-index: 1;
    animation: shadow 0.5s ease infinite alternate;
  }

  @keyframes shadow {
    100% {
      bottom: -18px;
      width: 100px;
    }
  }
`

export { LoaderText, LoaderElement, CubeFolding, CubeLoaderWrapper }