mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-29 13:06:41 +07:00
fixed some dialogs
This commit is contained in:
parent
39d950d5c5
commit
8c3ce1d1a5
4 changed files with 74 additions and 38 deletions
|
@ -9,54 +9,71 @@ type Props = {
|
|||
}
|
||||
|
||||
const noPoints = ({ routerCancel }: Props) => (
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text">
|
||||
<Icon icon="icon-pin-1" />
|
||||
<div className="big white upper">
|
||||
Укажите первую точку на карте
|
||||
<React.Fragment>
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text">
|
||||
<Icon icon="icon-pin-1" />
|
||||
<div className="big white upper">
|
||||
Укажите первую точку на карте
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="helper__buttons">
|
||||
<div className="button router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__buttons flex_1">
|
||||
<div className="flex_1" />
|
||||
<div className="button router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
const firstPoint = ({ routerCancel }: Props) => (
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text">
|
||||
<Icon icon="icon-pin-1" />
|
||||
<div className="big white upper">УКАЖИТЕ СЛЕДУЮЩУЮ ТОЧКУ</div>
|
||||
</div>
|
||||
<div className="helper__buttons">
|
||||
<div className="button router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
<React.Fragment>
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text">
|
||||
<Icon icon="icon-pin-1" />
|
||||
<div className="big white upper">УКАЖИТЕ СЛЕДУЮЩУЮ ТОЧКУ</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__buttons flex_1">
|
||||
<div className="flex_1" />
|
||||
<div className="button router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
const draggablePoints = ({ routerCancel, routerSubmit }: Props) => (
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__text success">
|
||||
<Icon icon="icon-check-1" />
|
||||
<div className="big upper">Продолжайте маршрут</div>
|
||||
</div>
|
||||
<div className="helper__buttons button-group">
|
||||
<div className="button button_red router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
<div className="button primary router-helper__button" onClick={routerSubmit}>
|
||||
Применить
|
||||
<React.Fragment>
|
||||
<div className="helper">
|
||||
<div className="helper__text success">
|
||||
<Icon icon="icon-check-1" />
|
||||
<div className="big upper">Продолжайте маршрут</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="helper router-helper">
|
||||
<div className="helper__buttons button-group flex_1">
|
||||
<div className="flex_1" />
|
||||
<div className="button button_red router-helper__button" onClick={routerCancel}>
|
||||
Отмена
|
||||
</div>
|
||||
<div className="button primary router-helper__button" onClick={routerSubmit}>
|
||||
Применить
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
export const RouterDialog = ({ routerPoints, routerCancel, routerSubmit, width }: Props) => (
|
||||
<div className="control-dialog control-dialog-big" style={{ width }}>
|
||||
export const RouterDialog = ({
|
||||
routerPoints, routerCancel, routerSubmit, width
|
||||
}: Props) => (
|
||||
<div className="control-dialog" style={{ width }}>
|
||||
{!routerPoints && noPoints({ routerCancel })}
|
||||
{routerPoints === 1 && firstPoint({ routerCancel })}
|
||||
{routerPoints >= 2 && draggablePoints({ routerCancel, routerSubmit })}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue