aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/standard_sliding_panel.tsx
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/components/standard_sliding_panel.tsx
parent239eada7d92e27ab5aa81d3364ffe5d83d0680a7 (diff)
downloaddexon-0x-contracts-daa011f7cbbc6719d99eef251d07f552e23c21fb.tar.gz
dexon-0x-contracts-daa011f7cbbc6719d99eef251d07f552e23c21fb.tar.zst
dexon-0x-contracts-daa011f7cbbc6719d99eef251d07f552e23c21fb.zip
feat: implement CurrentStandardSlidingPanel and put it in the main container
Diffstat (limited to 'packages/instant/src/components/standard_sliding_panel.tsx')
-rw-r--r--packages/instant/src/components/standard_sliding_panel.tsx28
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/instant/src/components/standard_sliding_panel.tsx b/packages/instant/src/components/standard_sliding_panel.tsx
new file mode 100644
index 000000000..6d31f3e3a
--- /dev/null
+++ b/packages/instant/src/components/standard_sliding_panel.tsx
@@ -0,0 +1,28 @@
+import * as React from 'react';
+
+import { SlideAnimationState, StandardSlidingPanelContent, StandardSlidingPanelSettings } from '../types';
+
+import { SlidingPanel } from './sliding_panel';
+
+export interface StandardSlidingPanelProps extends StandardSlidingPanelSettings {
+ onClose: () => void;
+}
+
+export class StandardSlidingPanel extends React.Component<StandardSlidingPanelProps> {
+ public render(): React.ReactNode {
+ const { animationState, content, onClose } = this.props;
+ return (
+ <SlidingPanel animationState={animationState} onClose={onClose}>
+ {this._getNodeForContent(content)}
+ </SlidingPanel>
+ );
+ }
+ private readonly _getNodeForContent = (content: StandardSlidingPanelContent): React.ReactNode => {
+ switch (content) {
+ case StandardSlidingPanelContent.InstallMetaMask:
+ return 'Install MetaMask';
+ default:
+ return null;
+ }
+ };
+}