mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
router spinner
This commit is contained in:
parent
663890dca6
commit
9adc93b3cc
8 changed files with 70 additions and 17 deletions
|
@ -4,10 +4,12 @@ import {
|
|||
routerCancel as routerCancelAction,
|
||||
routerSubmit as routerSubmitAction,
|
||||
} from "$redux/user/actions";
|
||||
import classnames from "classnames";
|
||||
|
||||
type Props = {
|
||||
routerPoints: number,
|
||||
width: number,
|
||||
is_routing: boolean,
|
||||
|
||||
routerCancel: typeof routerCancelAction,
|
||||
routerSubmit: typeof routerSubmitAction,
|
||||
|
@ -81,9 +83,11 @@ const draggablePoints = ({
|
|||
);
|
||||
|
||||
export const RouterDialog = ({
|
||||
routerPoints, routerCancel, routerSubmit, width
|
||||
routerPoints, routerCancel, routerSubmit, width, is_routing,
|
||||
}: Props) => (
|
||||
<div className="control-dialog" style={{ width }}>
|
||||
<div className={classnames('save-loader', { active: is_routing })} />
|
||||
|
||||
{!routerPoints && noPoints({ routerCancel })}
|
||||
{routerPoints === 1 && firstPoint({ routerCancel })}
|
||||
{routerPoints >= 2 && draggablePoints({ routerCancel, routerSubmit })}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue