aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-10 03:15:32 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-10 03:15:32 +0800
commitdaa011f7cbbc6719d99eef251d07f552e23c21fb (patch)
treeda1af3c83e7ed8677228714a18d67ea97147119a /packages/instant/src/containers
parent239eada7d92e27ab5aa81d3364ffe5d83d0680a7 (diff)
downloaddexon-sol-tools-daa011f7cbbc6719d99eef251d07f552e23c21fb.tar
dexon-sol-tools-daa011f7cbbc6719d99eef251d07f552e23c21fb.tar.gz
dexon-sol-tools-daa011f7cbbc6719d99eef251d07f552e23c21fb.tar.bz2
dexon-sol-tools-daa011f7cbbc6719d99eef251d07f552e23c21fb.tar.lz
dexon-sol-tools-daa011f7cbbc6719d99eef251d07f552e23c21fb.tar.xz
dexon-sol-tools-daa011f7cbbc6719d99eef251d07f552e23c21fb.tar.zst
dexon-sol-tools-daa011f7cbbc6719d99eef251d07f552e23c21fb.zip
feat: implement CurrentStandardSlidingPanel and put it in the main container
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/current_standard_sliding_panel.ts31
-rw-r--r--packages/instant/src/containers/latest_error.tsx3
2 files changed, 32 insertions, 2 deletions
diff --git a/packages/instant/src/containers/current_standard_sliding_panel.ts b/packages/instant/src/containers/current_standard_sliding_panel.ts
new file mode 100644
index 000000000..82ac7fa1b
--- /dev/null
+++ b/packages/instant/src/containers/current_standard_sliding_panel.ts
@@ -0,0 +1,31 @@
+import * as React from 'react';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
+
+import { StandardSlidingPanel } from '../components/standard_sliding_panel';
+import { Action, actions } from '../redux/actions';
+import { State } from '../redux/reducer';
+import { StandardSlidingPanelSettings } from '../types';
+
+export interface CurrentStandardSlidingPanelProps {}
+
+interface ConnectedState extends StandardSlidingPanelSettings {}
+
+interface ConnectedDispatch {
+ onClose: () => void;
+}
+
+const mapStateToProps = (state: State, _ownProps: CurrentStandardSlidingPanelProps): ConnectedState =>
+ state.standardSlidingPanelSettings;
+
+const mapDispatchToProps = (
+ dispatch: Dispatch<Action>,
+ ownProps: CurrentStandardSlidingPanelProps,
+): ConnectedDispatch => ({
+ onClose: () => dispatch(actions.closeStandardSlidingPanel()),
+});
+
+export const CurrentStandardSlidingPanel: React.ComponentClass<CurrentStandardSlidingPanelProps> = connect(
+ mapStateToProps,
+ mapDispatchToProps,
+)(StandardSlidingPanel);
diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx
index 99e55a6c4..347705697 100644
--- a/packages/instant/src/containers/latest_error.tsx
+++ b/packages/instant/src/containers/latest_error.tsx
@@ -2,10 +2,9 @@ import * as React from 'react';
import { connect } from 'react-redux';
-import { SlideAnimationState } from '../components/animations/slide_animation';
import { SlidingError } from '../components/sliding_error';
import { State } from '../redux/reducer';
-import { Asset, DisplayStatus } from '../types';
+import { Asset, DisplayStatus, SlideAnimationState } from '../types';
export interface LatestErrorComponentProps {
asset?: Asset;