aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-31 07:57:42 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-31 07:57:42 +0800
commit91f8487947d7941b508c34d1bfc1e72c0840c33d (patch)
treef3382eda9cae53b2b61e9f2c3cd4690ce6d7cc52 /packages/instant/src/containers
parent4456c3ee14f5cd778e0d16ab42a3e2e34d102f23 (diff)
downloaddexon-sol-tools-91f8487947d7941b508c34d1bfc1e72c0840c33d.tar
dexon-sol-tools-91f8487947d7941b508c34d1bfc1e72c0840c33d.tar.gz
dexon-sol-tools-91f8487947d7941b508c34d1bfc1e72c0840c33d.tar.bz2
dexon-sol-tools-91f8487947d7941b508c34d1bfc1e72c0840c33d.tar.lz
dexon-sol-tools-91f8487947d7941b508c34d1bfc1e72c0840c33d.tar.xz
dexon-sol-tools-91f8487947d7941b508c34d1bfc1e72c0840c33d.tar.zst
dexon-sol-tools-91f8487947d7941b508c34d1bfc1e72c0840c33d.zip
feat: implement sliding panel
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/latest_error.tsx10
-rw-r--r--packages/instant/src/containers/selected_asset_instant_heading.ts6
2 files changed, 9 insertions, 7 deletions
diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx
index 2a8d232da..99e55a6c4 100644
--- a/packages/instant/src/containers/latest_error.tsx
+++ b/packages/instant/src/containers/latest_error.tsx
@@ -2,7 +2,7 @@ import * as React from 'react';
import { connect } from 'react-redux';
-import { SlideAnimationPhase } from '../components/animations/slide_animations';
+import { SlideAnimationState } from '../components/animations/slide_animation';
import { SlidingError } from '../components/sliding_error';
import { State } from '../redux/reducer';
import { Asset, DisplayStatus } from '../types';
@@ -10,26 +10,26 @@ import { Asset, DisplayStatus } from '../types';
export interface LatestErrorComponentProps {
asset?: Asset;
latestErrorMessage?: string;
- slidingPhase: SlideAnimationPhase;
+ animationState: SlideAnimationState;
}
export const LatestErrorComponent: React.StatelessComponent<LatestErrorComponentProps> = props => {
if (!props.latestErrorMessage) {
return <div />;
}
- return <SlidingError phase={props.slidingPhase} icon="😢" message={props.latestErrorMessage} />;
+ return <SlidingError animationState={props.animationState} icon="😢" message={props.latestErrorMessage} />;
};
interface ConnectedState {
asset?: Asset;
latestErrorMessage?: string;
- slidingPhase: SlideAnimationPhase;
+ animationState: SlideAnimationState;
}
export interface LatestErrorProps {}
const mapStateToProps = (state: State, _ownProps: LatestErrorProps): ConnectedState => ({
asset: state.selectedAsset,
latestErrorMessage: state.latestErrorMessage,
- slidingPhase: state.latestErrorDisplayStatus === DisplayStatus.Present ? 'slideIn' : 'slideOut',
+ animationState: state.latestErrorDisplayStatus === DisplayStatus.Present ? 'slidIn' : 'slidOut',
});
export const LatestError = connect(mapStateToProps)(LatestErrorComponent);
diff --git a/packages/instant/src/containers/selected_asset_instant_heading.ts b/packages/instant/src/containers/selected_asset_instant_heading.ts
index 6b2a29b07..e413c7ef1 100644
--- a/packages/instant/src/containers/selected_asset_instant_heading.ts
+++ b/packages/instant/src/containers/selected_asset_instant_heading.ts
@@ -5,11 +5,13 @@ import { connect } from 'react-redux';
import { oc } from 'ts-optchain';
import { State } from '../redux/reducer';
-import { AsyncProcessState, OrderState } from '../types';
+import { AsyncProcessState, ERC20Asset, OrderState } from '../types';
import { InstantHeading } from '../components/instant_heading';
-export interface InstantHeadingProps {}
+export interface InstantHeadingProps {
+ onSymbolClick?: (asset?: ERC20Asset) => void;
+}
interface ConnectedState {
selectedAssetAmount?: BigNumber;