mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
changelog: dialog for changelog
This commit is contained in:
parent
b719b3f1a2
commit
65e549a5af
12 changed files with 218 additions and 34 deletions
|
@ -3,14 +3,20 @@ import React from 'react';
|
|||
import { DIALOGS } from '$constants/dialogs';
|
||||
import { MapListDialog } from '$components/dialogs/MapListDialog';
|
||||
import classnames from 'classnames';
|
||||
import { AppInfoDialog } from '$components/dialogs/AppInfoDialog';
|
||||
|
||||
type Props = {
|
||||
dialog: String,
|
||||
dialog_active: Boolean,
|
||||
}
|
||||
|
||||
const LEFT_DIALOGS = {
|
||||
[DIALOGS.MAP_LIST]: MapListDialog,
|
||||
[DIALOGS.APP_INFO]: AppInfoDialog,
|
||||
};
|
||||
|
||||
export const LeftDialog = ({ dialog, dialog_active }: Props) => (
|
||||
<div className={classnames('dialog', { active: dialog_active })}>
|
||||
{ dialog === DIALOGS.MAP_LIST && <MapListDialog /> }
|
||||
{ dialog && LEFT_DIALOGS[dialog] && React.createElement(LEFT_DIALOGS[dialog]) }
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue