Skip to content
Snippets Groups Projects
  • Neil's avatar
    e8055bbc
    Mobile pages standardized (Colors/UI) (#1874) · e8055bbc
    Neil authored
    * Mobile Color Consistency
    
    * VRT updates
    
    * color updates
    
    * notes
    
    * Sync Text
    
    * Adjust header font smaller
    
    * color and format adjustments
    
    * tidying header buttons
    
    * color and button adjustments
    
    * Header Text color
    
    * VRT updates
    
    * back button changes
    
    * VRT changes
    
    * adjust buttons
    
    * lint fix
    
    * darkTheme header background
    
    * VRT updates
    
    * VRT updates
    Mobile pages standardized (Colors/UI) (#1874)
    Neil authored
    * Mobile Color Consistency
    
    * VRT updates
    
    * color updates
    
    * notes
    
    * Sync Text
    
    * Adjust header font smaller
    
    * color and format adjustments
    
    * tidying header buttons
    
    * color and button adjustments
    
    * Header Text color
    
    * VRT updates
    
    * back button changes
    
    * VRT changes
    
    * adjust buttons
    
    * lint fix
    
    * darkTheme header background
    
    * VRT updates
    
    * VRT updates
AnimatedRefresh.tsx 785 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;
  width?: number;
  height?: number;
};

export default function AnimatedRefresh({
  animating,
  iconStyle,
  width,
  height,
}: AnimatedRefreshProps) {
  return (
    <View
      style={{ animation: animating ? `${spin} 1s infinite linear` : null }}
    >
      <Refresh
        width={width ? width : 14}
        height={height ? height : 14}
        style={iconStyle}
      />
    </View>
  );
}