Skip to content

Commit

Permalink
Merge pull request #111 from Portkey-Wallet/feature/theme
Browse files Browse the repository at this point in the history
Feature/theme
  • Loading branch information
sarah-portkey authored Dec 30, 2024
2 parents e22bc58 + 126e0b1 commit dbcd7f9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ body {
background-color: #fff;
}

.bg-black {
background-color: #151318;
}

/* The purpose of using multiple class names is to increase style weight */
.common-prompt-modal.portkey-ant-modal-wrap.portkey-ui-wrapper {
.portkey-ant-modal-body {
Expand Down
3 changes: 3 additions & 0 deletions src/components/Loading/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.loading-wrapper {
background-color: rgb(00 00 00 / 20%);
}
.dark-theme {
color: #fff;
}
2 changes: 1 addition & 1 deletion src/components/Loading/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client"
import { useMemo } from "react";
import { OpacityType } from "src/types";
import "./index.css";
import { PureLoadingIndicator } from "@portkey/did-ui-react";
import "./index.css";

export interface LoadingProps {
loading?: boolean | OpacityType;
Expand Down
11 changes: 11 additions & 0 deletions src/pages-components/telegram-auth/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@
justify-content: center;
height: 100vh;
}
.telegram-wrapper.dark-theme {
background-color: #151318;
}
.dark-theme #login-btn {
cursor: pointer;
width: 320px;
height: 48px;
border-radius: 24px;
border: 1px solid #5A5A5A;
background-color: #151318;
}
4 changes: 3 additions & 1 deletion src/pages-components/telegram-auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from "src/constants";
import { SearchParams } from "src/types";
import { stringify } from "query-string";
import clsx from "clsx";
import "./index.css";

enum TGStauts {
Expand All @@ -32,6 +33,7 @@ export default function TelegramAuth({
useEffect(() => {
changeLoading.current = onLoadingChange;
});
const {theme = 'light'} = searchParams;

const serviceURL = useMemo(() => {
const { network, serviceURI } = searchParams;
Expand Down Expand Up @@ -116,7 +118,7 @@ export default function TelegramAuth({
}, [getTelegramAuth]);

return (
<div className="telegram-wrapper">
<div className={clsx("telegram-wrapper", theme === 'dark' && 'dark-theme')}>
<link
rel="stylesheet"
href="https://telegram.org/css/widget-frame.css?66"
Expand Down

0 comments on commit dbcd7f9

Please sign in to comment.