mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
sticker panel with ability to choose
This commit is contained in:
parent
40a11297c0
commit
f2c9cc4abc
10 changed files with 140 additions and 64 deletions
|
@ -2,14 +2,19 @@ import React from 'react';
|
|||
import { MODES } from '$constants/modes';
|
||||
|
||||
import { RouterHelper } from '$components/router/RouterHelper';
|
||||
import { StickersHelper } from '$components/stickers/StickersHelper';
|
||||
|
||||
export const EditorDialog = ({ mode, routerPoints, editor }) => {
|
||||
const showDialog = (mode === MODES.ROUTER);
|
||||
export const EditorDialog = ({ mode, routerPoints, editor, activeSticker }) => {
|
||||
const showDialog = (
|
||||
mode === MODES.ROUTER
|
||||
|| (mode === MODES.STICKERS && !activeSticker)
|
||||
);
|
||||
|
||||
return (
|
||||
showDialog &&
|
||||
<div id="control-dialog">
|
||||
{ mode === MODES.ROUTER && <RouterHelper routerPoints={routerPoints} editor={editor} /> }
|
||||
{ mode === MODES.STICKERS && <StickersHelper editor={editor} /> }
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue