mirror of
https://github.com/trezor/trezor-wallet
synced 2025-06-05 07:38:47 +00:00
commit
f447774186
@ -1,10 +1,10 @@
|
|||||||
/* @flow */
|
/* @flow */
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { CSSTransition } from 'react-transition-group';
|
|
||||||
|
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import colors from 'config/colors';
|
import colors from 'config/colors';
|
||||||
|
import { FADE_IN } from 'config/animations';
|
||||||
|
|
||||||
import { UI } from 'trezor-connect';
|
import { UI } from 'trezor-connect';
|
||||||
import * as MODAL from 'actions/constants/modal';
|
import * as MODAL from 'actions/constants/modal';
|
||||||
@ -31,15 +31,6 @@ import Stellar from 'components/modals/external/Stellar';
|
|||||||
|
|
||||||
import type { Props } from './Container';
|
import type { Props } from './Container';
|
||||||
|
|
||||||
const Fade = (props: { children: React.Node}) => (
|
|
||||||
<CSSTransition
|
|
||||||
{...props}
|
|
||||||
timeout={1000}
|
|
||||||
classNames="fade"
|
|
||||||
>{ props.children }
|
|
||||||
</CSSTransition>
|
|
||||||
);
|
|
||||||
|
|
||||||
const ModalContainer = styled.div`
|
const ModalContainer = styled.div`
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
@ -53,6 +44,7 @@ const ModalContainer = styled.div`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
animation: ${FADE_IN} 0.3s;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ModalWindow = styled.div`
|
const ModalWindow = styled.div`
|
||||||
@ -192,13 +184,11 @@ const Modal = (props: Props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fade key="modal-fade">
|
|
||||||
<ModalContainer>
|
<ModalContainer>
|
||||||
<ModalWindow>
|
<ModalWindow>
|
||||||
{ component }
|
{ component }
|
||||||
</ModalWindow>
|
</ModalWindow>
|
||||||
</ModalContainer>
|
</ModalContainer>
|
||||||
</Fade>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,3 +57,12 @@ export const PULSATE = keyframes`
|
|||||||
opacity: 1.0;
|
opacity: 1.0;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const FADE_IN = keyframes`
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
`;
|
Loading…
Reference in New Issue
Block a user