UNPKG

@kiwicom/smart-faq

Version:

36 lines (30 loc) 766 B
// @flow import * as React from 'react'; import Spinner from '../../staging/static/spinner@2x.png'; type Props = {| fullHeight?: boolean, |}; const Loader = ({ fullHeight }: Props) => ( <div className="wrapper"> <img className="spinner" src={Spinner} alt="" /> <style jsx> {` div.wrapper { display:flex; flex: 1; height: ${fullHeight ? '100%' : 'auto'}; justify-content: center; align-items: center; } .spinner { width:140px; animation: spin 1.5s linear infinite; @keyframes spin { 0% { transform rotate(0deg); } 100% { transform rotate(359deg); } } `} </style> </div> ); export default Loader;