blob: 6d31f3e3a8c0aa7d00f4f9a4ad36bd398dedcdf5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;
}
};
}
|