-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy pathstyles.js
More file actions
47 lines (41 loc) · 936 Bytes
/
styles.js
File metadata and controls
47 lines (41 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* External dependencies
*/
import styled from '@emotion/styled';
import { css, keyframes } from '@emotion/react';
/**
* Internal dependencies
*/
import { COLORS, CONFIG } from '../utils';
const spinAnimation = keyframes`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`;
export const StyledSpinner = styled.svg`
width: ${ CONFIG.spinnerSize }px;
height: ${ CONFIG.spinnerSize }px;
display: inline-block;
margin: 5px 11px 0;
position: relative;
color: var( --wp-admin-theme-color );
overflow: visible;
`;
const commonPathProps = css`
fill: transparent;
stroke-width: 1.5px;
`;
export const SpinnerTrack = styled.circle`
${ commonPathProps };
stroke: ${ COLORS.gray[ 300 ] };
`;
export const SpinnerIndicator = styled.path`
${ commonPathProps };
stroke: currentColor;
stroke-linecap: round;
transform-origin: 50% 50%;
animation: 1.4s linear infinite both ${ spinAnimation };
`;