Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: theme colors for token details #637

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/popup/list/TokenListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const DivDescriptionWrapper = styled.div`
const DivTitleWrapper = styled.div`
font-size: 1rem;
font-weight: 600;
color: ${(props) => props.theme.primaryText};
`;

const DivListItem = styled.div`
Expand Down Expand Up @@ -122,7 +123,7 @@ const ImgTokenLogo = styled.img.attrs({
const SpanTokenType = styled.span`
padding: 0.08rem 0.2rem;
background-color: rgb(${(props) => props.theme.theme});
color: #fff;
color: ${(props) => props.theme.primaryText};
font-weight: 500;
font-size: 0.5rem;
text-transform: uppercase;
Expand Down
22 changes: 10 additions & 12 deletions src/routes/popup/settings/tokens/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
import {
ButtonV2,
SelectV2,
Spacer,
Text,
TooltipV2,
useToasts
} from "@arconnect/components";
import { ButtonV2, Spacer, Text, TooltipV2 } from "@arconnect/components";
import { Select as SelectV2, useToasts } from "@arconnect/components-rebrand";
import type { TokenType } from "~tokens/token";
import { useStorage } from "~utils/storage";
import { ExtensionStorage } from "~utils/storage";
import { TrashIcon } from "@iconicicons/react";
import { removeToken } from "~tokens";
import { useMemo } from "react";
import browser from "webextension-polyfill";
import styled from "styled-components";
import styled, { useTheme } from "styled-components";
import copy from "copy-to-clipboard";
import { formatAddress } from "~utils/format";
import { CopyButton } from "~components/dashboard/subsettings/WalletSettings";
import HeadV2 from "~components/popup/HeadV2";
import type { CommonRouteProps } from "~wallets/router/router.types";
import { useLocation } from "~wallets/router/router.utils";
import { LoadingView } from "~components/page/common/loading/loading.view";

export interface TokenSettingsParams {
id: string;
}
Expand All @@ -30,6 +23,7 @@ export type TokenSettingsProps = CommonRouteProps<TokenSettingsParams>;

export function TokenSettingsView({ params: { id } }: TokenSettingsProps) {
const { navigate } = useLocation();
const theme = useTheme();

// ao tokens
const [aoTokens, setAoTokens] = useStorage<any[]>(
Expand Down Expand Up @@ -95,6 +89,7 @@ export function TokenSettingsView({ params: { id } }: TokenSettingsProps) {
setToast({
type: "info",
content: browser.i18n.getMessage("copied_address", [
token.ticker,
formatAddress(token.id, 8)
]),
duration: 2200
Expand All @@ -105,6 +100,7 @@ export function TokenSettingsView({ params: { id } }: TokenSettingsProps) {
</TokenAddress>
<SelectV2
small
style={{ color: theme.primaryText, paddingLeft: "0px" }}
label={browser.i18n.getMessage("token_type")}
onChange={(e) => {
// @ts-expect-error
Expand Down Expand Up @@ -166,8 +162,10 @@ const BasePropertyText = styled(Text).attrs({
font-weight: 500;
`;

const PropertyName = styled(BasePropertyText)``;
const PropertyName = styled(BasePropertyText)`
color: ${(props) => props.theme.primaryText};
`;

const PropertyValue = styled(BasePropertyText)`
color: ${(props) => props.theme.primaryText};
color: ${(props) => props.theme.secondaryText};
`;