mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-13 01:20:59 +00:00
eslint fix
This commit is contained in:
parent
84d71614f6
commit
3cf3f9530e
@ -3,6 +3,16 @@ import PropTypes from 'prop-types';
|
|||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
import styled, { keyframes } from 'styled-components';
|
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
|
// TODO: make animation of icons better
|
||||||
const rotate180up = keyframes`
|
const rotate180up = keyframes`
|
||||||
from {
|
from {
|
||||||
@ -23,7 +33,7 @@ const rotate180down = keyframes`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const SvgWrapper = styled.svg`
|
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 {
|
:hover {
|
||||||
path {
|
path {
|
||||||
|
Loading…
Reference in New Issue
Block a user