1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-12 17:10:56 +00:00

eslint fix

This commit is contained in:
Vasek Mlejnsky 2018-09-24 14:46:13 +02:00
parent 84d71614f6
commit 3cf3f9530e

View File

@ -3,6 +3,16 @@ import PropTypes from 'prop-types';
import colors from 'config/colors';
import styled, { keyframes } from 'styled-components';
const chooseIconAnimationType = (canAnimate, isActive) => {
if (canAnimate) {
if (isActive) {
return rotate180up;
}
return rotate180down;
}
return null;
};
// TODO: make animation of icons better
const rotate180up = keyframes`
from {
@ -23,7 +33,7 @@ const rotate180down = keyframes`
`;
const SvgWrapper = styled.svg`
animation: ${props => (props.canAnimate ? (props.isActive ? rotate180up : rotate180down) : null)} 0.2s linear 1 forwards;
animation: ${props => chooseIconAnimationType(props.canAnimate, props.isActive)} 0.2s linear 1 forwards;
:hover {
path {