Skip to content

Commit

Permalink
fix web3auth adapterLogo bg issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BboyStatix committed May 23, 2024
1 parent dbcd5db commit 7903f10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
8 changes: 0 additions & 8 deletions packages/ui/css/web3auth.css
Original file line number Diff line number Diff line change
Expand Up @@ -445,18 +445,10 @@
@apply flex p-2;
}

#w3a-modal .w3a-modal__loader-app-logo--default {
@apply bg-app-primary-600 dark:bg-app-gray-50 w-[72px] h-[72px] rounded-full items-center justify-center;
}

#w3a-modal .w3a-modal__loader-app-logo img {
@apply max-h-[72px] max-w-[72px] w-[72px] h-auto;
}

#w3a-modal .w3a-modal__loader-app-logo--default img {
@apply max-h-[45px] max-w-[45px] w-[45px];
}

#w3a-modal .w3a-modal__loader-social-logo {
@apply bg-app-gray-100 dark:bg-app-gray-50 w-[72px] h-[72px] flex rounded-full items-center justify-center;
}
Expand Down
9 changes: 4 additions & 5 deletions packages/ui/src/components/AdapterLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ADAPTER_STATUS, log } from "@web3auth/base";
import { useEffect } from "react";
import { useTranslation } from "react-i18next";

import { DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT, MODAL_STATUS, ModalStatusType } from "../interfaces";
import { MODAL_STATUS, ModalStatusType } from "../interfaces";
import i18n from "../localeImport";
import Footer from "./Footer";
import Icon from "./Icon";
Expand All @@ -23,7 +23,6 @@ export default function DetailedLoader(props: DetailedLoaderProps) {
const { adapter, appLogo, message, modalStatus, adapterName, onClose } = props;
const providerIcon = adapter === "twitter" ? <Image imageId="login-x-dark" /> : <Image imageId={`login-${adapter}`} />;
const [t] = useTranslation(undefined, { i18n });
const isDefaultLogo = [DEFAULT_LOGO_DARK, DEFAULT_LOGO_LIGHT].includes(appLogo);

useEffect(() => {
log.debug("adapter loader re-rendering");
Expand All @@ -41,9 +40,9 @@ export default function DetailedLoader(props: DetailedLoaderProps) {
{modalStatus === MODAL_STATUS.CONNECTING && (
<>
<div className="w3a-modal__loader-bridge">
<div className={["w3a-modal__loader-app-logo", isDefaultLogo ? "w3a-modal__loader-app-logo--default" : ""].join(" ")}>
<img src={isDefaultLogo ? DEFAULT_LOGO_LIGHT : appLogo} className="block dark:hidden" alt="" />
<img src={isDefaultLogo ? DEFAULT_LOGO_DARK : appLogo} className="hidden dark:block" alt="" />
<div className="w3a-modal__loader-app-logo">
<img src={appLogo} className="block dark:hidden" alt="" />
<img src={appLogo} className="hidden dark:block" alt="" />
</div>
<div className="w3a-modal__connector">
<div className="w3a-modal__connector-beat">
Expand Down

0 comments on commit 7903f10

Please sign in to comment.