actual/packages/desktop-client/src/components/AnimatedRefresh.js
Tom French dc53a74459
Separate external, monorepo and internal imports (#237)
* 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
2022-09-02 12:43:37 +01:00

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>
);
}