/* @flow */ 'use strict'; import React, { Component } from 'react'; import { CSSTransition, Transition } from 'react-transition-group'; import { UI } from 'trezor-connect'; import Pin from './Pin'; import InvalidPin from './InvalidPin'; import Passphrase from './Passphrase'; import Permission from './Permission'; import Confirmation from './Confirmation'; import AccountSelection from './AccountSelection'; import FeeSelection from './FeeSelection'; const duration = 300; const defaultStyle = { transition: `opacity ${duration}ms ease-in-out`, opacity: 0, padding: 20, display: 'inline-block', backgroundColor: '#8787d8' } const transitionStyles = { entering: { opacity: 0 }, entered: { opacity: 1 }, }; const Fade2 = ({ in: inProp }) => ( {(state) => (
I'm A fade Transition2
)}
); const Fade = ({ children, ...props }) => ( { children } ); export default class Modal extends Component { render() { const { opened, windowType } = this.props.modal; let component = null; switch(windowType) { case UI.REQUEST_PIN : component = (); break; case UI.INVALID_PIN : component = (); break; case UI.REQUEST_PASSPHRASE : component = (); break; case UI.REQUEST_PERMISSION : component = (); break; case UI.REQUEST_CONFIRMATION : component = (); break; case UI.SELECT_ACCOUNT : component = (); break; case UI.SELECT_FEE : component = (); break; } let ch = null; if (opened) { ch = (
{ component }
); } return ch; } }