-
Joel Jeremy Marquez authored
* Remove usages of glamor CSSProperties * Cleanup * Re-add CellButton className prop * More removal of glamor CSSProperties * Release notes * Fix vrt test failures * Use React CSSProperties in View * Custom CSSProperties type * Settings UI regression fix * Fix type check errors * Address PR comments * CategorySpendingGraph style * Fix rebase mistake
Joel Jeremy Marquez authored* Remove usages of glamor CSSProperties * Cleanup * Re-add CellButton className prop * More removal of glamor CSSProperties * Release notes * Fix vrt test failures * Use React CSSProperties in View * Custom CSSProperties type * Settings UI regression fix * Fix type check errors * Address PR comments * CategorySpendingGraph style * Fix rebase mistake
AnimatedRefresh.tsx 665 B
import React from 'react';
import { keyframes } from 'glamor';
import Refresh from '../icons/v1/Refresh';
import { type CSSProperties } from '../style';
import View from './common/View';
let spin = keyframes({
'0%': { transform: 'rotateZ(0deg)' },
'100%': { transform: 'rotateZ(360deg)' },
});
type AnimatedRefreshProps = {
animating: boolean;
iconStyle?: CSSProperties;
};
export default function AnimatedRefresh({
animating,
iconStyle,
}: AnimatedRefreshProps) {
return (
<View
style={{ animation: animating ? `${spin} 1s infinite linear` : null }}
>
<Refresh width={14} height={14} style={iconStyle} />
</View>
);
}