Skip to content

Instantly share code, notes, and snippets.

@navneet-kumar
Created June 7, 2020 01:56
Show Gist options
  • Select an option

  • Save navneet-kumar/fc991e300a616b65c37044b32273d3a7 to your computer and use it in GitHub Desktop.

Select an option

Save navneet-kumar/fc991e300a616b65c37044b32273d3a7 to your computer and use it in GitHub Desktop.
import React from "react";
import styled from "styled-components";
import device from "../utils/device";
export const CenterPadded = styled.div`
padding: 5%;
margin: 5%;
position: relative;
@media ${device.tablet} {
padding: 0%;
margin: 0%;
}
`;
export const CenterPaddedForm = styled.form`
padding: 10%;
position: relative;
text-align: center;
@media ${device.tablet} {
padding: 5%;
}
`;
export const FormInput = styled.input`
width: 17em;
height: 2em;
border: 1px solid;
text-align: center;
border-radius: 0.5em;
margin: 0.3em;
`;
export const Button = styled.button`
border: 1px ;
border-radius: 0.2em;
background-color: lightgray;
`;
export const CenterText = styled.p`
text-align: center;
`;
const StyledSpinner = styled.svg`
animation: rotate 1s linear infinite;
width: 100%;
height: 15vh;
& .path {
stroke: #5652bf;
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;
}
}
`;
export const Spinner = () => (
<StyledSpinner viewBox="0 0 50 50">
<circle
className="path"
cx="25"
cy="25"
r="20"
fill="none"
strokeWidth="2"
/>
</StyledSpinner>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment