UNPKG

@chayns-components/core

Version:

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

66 lines (65 loc) 1.63 kB
import styled, { keyframes } from 'styled-components'; export const StyledSmallWaitCursor = styled.div` position: relative; height: ${({ $size }) => $size}px; width: ${({ $size }) => $size}px; opacity: ${({ $shouldShowWaitCursor }) => $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: ${({ $shouldHideBackground }) => $shouldHideBackground ? 0 : 5}px; left: ${({ $shouldHideBackground }) => $shouldHideBackground ? 0 : 5}px; z-index: 2; border-style: solid; border-width: 3px; border-color: ${({ theme, $shouldHideBackground, $color }) => { if ($color) { return $color; } return theme.colorMode === 'dark' && $shouldHideBackground ? theme.headline : theme.primary; }}; height: ${({ $shouldHideBackground, $size }) => $shouldHideBackground ? '100%' : `${$size - 10}px`}; width: ${({ $shouldHideBackground, $size }) => $shouldHideBackground ? '100%' : `${$size - 10}px`}; border-radius: 50%; display: inline-block; border-top: 3px solid transparent; animation: ${spin} ${({ $speed }) => $speed}s linear infinite; `; //# sourceMappingURL=SmallWaitCursor.styles.js.map