From 72b429321553841ac1ff48cf974bfc65da01bb06 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 19 Dec 2022 12:23:39 -0300 Subject: pretty --- .../src/components/exception/AsyncButton.tsx | 28 +++++++++++-------- .../src/components/exception/loading.tsx | 32 ++++++++++++++++------ .../src/components/exception/login.tsx | 2 +- 3 files changed, 42 insertions(+), 20 deletions(-) (limited to 'packages/merchant-backoffice-ui/src/components/exception') diff --git a/packages/merchant-backoffice-ui/src/components/exception/AsyncButton.tsx b/packages/merchant-backoffice-ui/src/components/exception/AsyncButton.tsx index b234ce847..510bc29b8 100644 --- a/packages/merchant-backoffice-ui/src/components/exception/AsyncButton.tsx +++ b/packages/merchant-backoffice-ui/src/components/exception/AsyncButton.tsx @@ -15,9 +15,9 @@ */ /** -* -* @author Sebastian Javier Marchano (sebasjm) -*/ + * + * @author Sebastian Javier Marchano (sebasjm) + */ import { ComponentChildren, h } from "preact"; import { LoadingModal } from "../modal/index.js"; @@ -25,10 +25,10 @@ import { useAsync } from "../../hooks/async.js"; import { Translate } from "../../i18n/index.js"; type Props = { - children: ComponentChildren, + children: ComponentChildren; disabled: boolean; onClick?: () => Promise; - [rest:string]: any, + [rest: string]: any; }; export function AsyncButton({ onClick, disabled, children, ...rest }: Props) { @@ -38,12 +38,18 @@ export function AsyncButton({ onClick, disabled, children, ...rest }: Props) { return ; } if (isLoading) { - return ; + return ( + + ); } - return - - ; + return ( + + + + ); } diff --git a/packages/merchant-backoffice-ui/src/components/exception/loading.tsx b/packages/merchant-backoffice-ui/src/components/exception/loading.tsx index 9c9b4daae..a043b81eb 100644 --- a/packages/merchant-backoffice-ui/src/components/exception/loading.tsx +++ b/packages/merchant-backoffice-ui/src/components/exception/loading.tsx @@ -15,18 +15,34 @@ */ /** -* -* @author Sebastian Javier Marchano (sebasjm) -*/ + * + * @author Sebastian Javier Marchano (sebasjm) + */ import { h, VNode } from "preact"; export function Loading(): VNode { - return
- -
+ return ( +
+ +
+ ); } export function Spinner(): VNode { - return
-} \ No newline at end of file + return ( +
+
+
+
+
+
+ ); +} diff --git a/packages/merchant-backoffice-ui/src/components/exception/login.tsx b/packages/merchant-backoffice-ui/src/components/exception/login.tsx index c2af2a83a..d1898915d 100644 --- a/packages/merchant-backoffice-ui/src/components/exception/login.tsx +++ b/packages/merchant-backoffice-ui/src/components/exception/login.tsx @@ -46,7 +46,7 @@ export function LoginModal({ onConfirm, withMessage }: Props): VNode { const { url: backendUrl, token: baseToken } = useBackendContext(); const { admin, token: instanceToken } = useInstanceContext(); const currentToken = getTokenValuePart( - !admin ? baseToken : instanceToken || "" + !admin ? baseToken : instanceToken || "", ); const [token, setToken] = useState(currentToken); -- cgit v1.2.3