Skip to content

Commit

Permalink
Merge pull request #1669 from Web3Auth/change-twitter-logo
Browse files Browse the repository at this point in the history
Change twitter bird logo to X
  • Loading branch information
chaitanyapotti authored Dec 22, 2023
2 parents 4d04422 + c34258c commit cc13f49
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/ui/modal/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -43,7 +43,7 @@ <h6 class="w3a-group__title">CONTINUE WITH</h6>
</li>
<li class="w3a-adapter-item">
<button class="w3a-button w3a-button--icon">
<img class="w3a-button__image" src="./images/login-twitter.svg" alt="" />
<img class="w3a-button__image" src="./images/login-x.svg" alt="" />
</button>
</li>
<li class="w3a-adapter-item">
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/AdapterLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const closeIcon = <Icon iconName="close" />;
export default function DetailedLoader(props: DetailedLoaderProps) {
const { adapter, appLogo, message, modalStatus, adapterName, onClose } = props;
const web3authIcon = <Image imageId="web3auth" />;
const providerIcon = <Image imageId={`login-${adapter}`} />;
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);

Expand Down
8 changes: 6 additions & 2 deletions packages/ui/src/components/SocialLogins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ export default function SocialLogins(props: SocialLoginProps) {
const isPrimaryBtn = socialLoginsConfig?.uiConfig?.primaryButton === "socialLogin" && order === 1;
const primaryColor = socialLoginsConfig?.uiConfig?.theme?.primary || "";

const imageId = `login-${method}${isDark || isPrimaryBtn ? "-light" : "-dark"}`;
const imageId =
method === LOGIN_PROVIDER.TWITTER
? `login-twitter-x${isDark || isPrimaryBtn ? "-light" : "-dark"}`
: `login-${method}${isDark || isPrimaryBtn ? "-light" : "-dark"}`;
const hoverId = `login-${method}-active`;
const hoverImage = method === LOGIN_PROVIDER.APPLE || method === LOGIN_PROVIDER.GITHUB ? imageId : hoverId;
const hoverImage =
method === LOGIN_PROVIDER.APPLE || method === LOGIN_PROVIDER.GITHUB || method === LOGIN_PROVIDER.TWITTER ? imageId : hoverId;
const providerIcon = <Image width="20" imageId={imageId} hoverImageId={hoverImage} isButton />;

if (socialLoginsConfig.loginMethods[method].showOnModal === false || restrictedLoginMethods.includes(method)) {
Expand Down

0 comments on commit cc13f49

Please sign in to comment.