UNPKG

@chayns-components/core

Version:

A set of beautiful React components for developing your own applications with chayns.

83 lines (82 loc) 1.64 kB
import styled, { keyframes } from 'styled-components'; export const StyledSmallWaitCursor = styled.div` position: relative; height: ${_ref => { let { $size } = _ref; return $size; }}px; width: ${_ref2 => { let { $size } = _ref2; return $size; }}px; opacity: ${_ref3 => { let { $shouldShowWaitCursor } = _ref3; return $shouldShowWaitCursor ? 1 : 0; }}; `; export const StyledSmallWaitCursorBackground = styled.div` background-color: white; border-radius: 50%; height: 100%; width: 100%; position: relative; z-index: 1; box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.2); `; const spin = keyframes` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `; export const StyledSmallWaitCursorWaitCursor = styled.div` position: absolute; top: 5px; left: 5px; z-index: 2; border-style: solid; border-width: 3px; border-color: ${_ref4 => { let { theme, $shouldHideBackground, $color } = _ref4; if ($color) { return $color; } return theme.colorMode === 'dark' && $shouldHideBackground ? theme.headline : theme.primary; }}; height: ${_ref5 => { let { $size } = _ref5; return `${$size - 10}px`; }}; width: ${_ref6 => { let { $size } = _ref6; return `${$size - 10}px`; }}; border-radius: 50%; display: inline-block; border-top: 3px solid transparent; animation: ${spin} ${_ref7 => { let { $speed } = _ref7; return $speed; }}s linear infinite; `; //# sourceMappingURL=SmallWaitCursor.styles.js.map