dc53a74459
* style: enforce ordering of imports * style: sort imports in loot-core * style: sort imports in desktop-client * style: sort imports in loot-design * style: manual fixes
31 lines
718 B
JavaScript
31 lines
718 B
JavaScript
import React from 'react';
|
|
|
|
import { css } from 'glamor';
|
|
|
|
import { View } from 'loot-design/src/components/common';
|
|
import Refresh from 'loot-design/src/svg/v1/Refresh';
|
|
|
|
let spin = css.keyframes({
|
|
'0%': { transform: 'rotateZ(0deg)' },
|
|
'100%': { transform: 'rotateZ(360deg)' }
|
|
});
|
|
|
|
let spinStop = css.keyframes({
|
|
'0%': { transform: 'rotateZ(0deg)' },
|
|
'100%': { transform: 'rotateZ(180deg)' }
|
|
});
|
|
|
|
export default function AnimatedRefresh({ animating, iconStyle }) {
|
|
return (
|
|
<View
|
|
style={[{ animation: animating ? `${spin} 1s infinite linear` : null }]}
|
|
>
|
|
<Refresh
|
|
width={14}
|
|
height={14}
|
|
style={{ color: 'currentColor', ...iconStyle }}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|