mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
fixed trash dialog
This commit is contained in:
parent
87670770b0
commit
67eeaa7293
1 changed files with 29 additions and 16 deletions
|
@ -1,18 +1,27 @@
|
||||||
import React from 'react';
|
import React, { FC } from 'react';
|
||||||
import { Icon } from '~/components/panels/Icon';
|
import { connect } from 'react-redux';
|
||||||
|
import * as EDITOR_ACTIONS from '~/redux/editor/actions';
|
||||||
|
|
||||||
type Props = {
|
const mapStateToProps = () => ({});
|
||||||
clearPoly: () => void,
|
const mapDispatchToProps = {
|
||||||
clearStickers: () => void,
|
editorClearPoly: EDITOR_ACTIONS.editorClearPoly,
|
||||||
clearAll: () => void,
|
editorClearStickers: EDITOR_ACTIONS.editorClearStickers,
|
||||||
clearCancel: () => void,
|
editorClearAll: EDITOR_ACTIONS.editorClearAll,
|
||||||
|
editorClearCancel: EDITOR_ACTIONS.editorClearCancel,
|
||||||
|
};
|
||||||
|
|
||||||
width: number,
|
type Props = ReturnType<typeof mapStateToProps> &
|
||||||
}
|
typeof mapDispatchToProps & {
|
||||||
|
width: number;
|
||||||
|
};
|
||||||
|
|
||||||
export const TrashDialog = ({
|
const TrashDialogUnconnected: FC<Props> = ({
|
||||||
clearPoly, clearStickers, clearAll, clearCancel, width,
|
editorClearPoly,
|
||||||
}: Props) => (
|
editorClearStickers,
|
||||||
|
editorClearAll,
|
||||||
|
editorClearCancel,
|
||||||
|
width,
|
||||||
|
}) => (
|
||||||
<div className="control-dialog" style={{ width }}>
|
<div className="control-dialog" style={{ width }}>
|
||||||
<div className="helper trash-helper desktop-only">
|
<div className="helper trash-helper desktop-only">
|
||||||
<div className="helper__text danger">
|
<div className="helper__text danger">
|
||||||
|
@ -22,21 +31,25 @@ export const TrashDialog = ({
|
||||||
<div className="helper trash-helper">
|
<div className="helper trash-helper">
|
||||||
<div className="helper__buttons flex_1 trash-buttons">
|
<div className="helper__buttons flex_1 trash-buttons">
|
||||||
<div className="button-group">
|
<div className="button-group">
|
||||||
<div className="button router-helper__button" onClick={clearPoly}>
|
<div className="button router-helper__button" onClick={editorClearPoly}>
|
||||||
Маршрут
|
Маршрут
|
||||||
</div>
|
</div>
|
||||||
<div className="button router-helper__button" onClick={clearStickers}>
|
<div className="button router-helper__button" onClick={editorClearStickers}>
|
||||||
Стикеры
|
Стикеры
|
||||||
</div>
|
</div>
|
||||||
<div className="button router-helper__button" onClick={clearAll}>
|
<div className="button router-helper__button" onClick={editorClearAll}>
|
||||||
ВСЕ
|
ВСЕ
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex_1" />
|
<div className="flex_1" />
|
||||||
<div className="button primary router-helper__button" onClick={clearCancel}>
|
<div className="button primary router-helper__button" onClick={editorClearCancel}>
|
||||||
Отмена
|
Отмена
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const TrashDialog = connect(mapStateToProps, mapDispatchToProps)(TrashDialogUnconnected);
|
||||||
|
|
||||||
|
export { TrashDialog };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue