You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
659 B
TypeScript
25 lines
659 B
TypeScript
import React from 'react';
|
|
|
|
import { useRightOverlayMode } from '../../../hooks/useUI';
|
|
import { OverlayRightPanelSettings } from './overlay/OverlayRightPanelSettings';
|
|
import { OverlayDisappearingMessages } from './overlay/disappearing-messages/OverlayDisappearingMessages';
|
|
|
|
const ClosableOverlay = () => {
|
|
const rightOverlayMode = useRightOverlayMode();
|
|
|
|
switch (rightOverlayMode) {
|
|
case 'disappearing-messages':
|
|
return <OverlayDisappearingMessages />;
|
|
default:
|
|
return <OverlayRightPanelSettings />;
|
|
}
|
|
};
|
|
|
|
export const RightPanel = () => {
|
|
return (
|
|
<div className="right-panel">
|
|
<ClosableOverlay />
|
|
</div>
|
|
);
|
|
};
|