From daf447361f911acf19a0f0489039244695945218 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 22 Oct 2018 13:11:29 -0700 Subject: WIP: spinner --- .../src/components/animations/full_rotation.tsx | 15 +++++++++++ packages/instant/src/components/ui/spinner.tsx | 30 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 packages/instant/src/components/animations/full_rotation.tsx create mode 100644 packages/instant/src/components/ui/spinner.tsx diff --git a/packages/instant/src/components/animations/full_rotation.tsx b/packages/instant/src/components/animations/full_rotation.tsx new file mode 100644 index 000000000..0b36fd21f --- /dev/null +++ b/packages/instant/src/components/animations/full_rotation.tsx @@ -0,0 +1,15 @@ +import { keyframes, styled } from '../../style/theme'; + +const rotatingKeyframes = keyframes` +from { + transform: rotate(0deg); +} + +to { + transform: rotate(360deg); +} +`; + +export const FullRotation = styled.div` + animation: ${rotatingKeyframes} 2s linear infinite; +`; diff --git a/packages/instant/src/components/ui/spinner.tsx b/packages/instant/src/components/ui/spinner.tsx new file mode 100644 index 000000000..e5d2808f3 --- /dev/null +++ b/packages/instant/src/components/ui/spinner.tsx @@ -0,0 +1,30 @@ +import * as React from 'react'; + +import { FullRotation } from '../animations/full_rotation'; + +export interface SpinnerProps { + width: number; + height: number; +} +export const Spinner: React.StatelessComponent = props => { + return ( + + + + + + + ); +}; -- cgit