From 6d6fff870313805f3f7e60bd68663aa02853801a Mon Sep 17 00:00:00 2001 From: Wukong Sun Date: Fri, 11 Sep 2026 00:38:29 +0800 Subject: [PATCH] fix: mf-6831 use palette-adaptive text colors for token tag popper footer --- .../src/SiteAdaptor/trending/PluginDescriptor.tsx | 5 ++++- .../SiteAdaptor/trending/TrendingViewDescriptor.tsx | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/plugins/Trader/src/SiteAdaptor/trending/PluginDescriptor.tsx b/packages/plugins/Trader/src/SiteAdaptor/trending/PluginDescriptor.tsx index 85c37e768b0..0c06c8e3c0e 100644 --- a/packages/plugins/Trader/src/SiteAdaptor/trending/PluginDescriptor.tsx +++ b/packages/plugins/Trader/src/SiteAdaptor/trending/PluginDescriptor.tsx @@ -32,7 +32,10 @@ export function PluginDescriptor({ children, isProfilePage, isTokenTagPopper }: sx={{ fontWeight: 'bolder', fontSize: 16, - color: (theme) => theme.vars.palette.maskColor.publicMain, + color: (theme) => + isTokenTagPopper ? + theme.vars.palette.maskColor.main + : theme.vars.palette.maskColor.publicMain, }}> {isTokenTagPopper ? Web3 Profile Card diff --git a/packages/plugins/Trader/src/SiteAdaptor/trending/TrendingViewDescriptor.tsx b/packages/plugins/Trader/src/SiteAdaptor/trending/TrendingViewDescriptor.tsx index bfa6f96ff54..88839560c96 100644 --- a/packages/plugins/Trader/src/SiteAdaptor/trending/TrendingViewDescriptor.tsx +++ b/packages/plugins/Trader/src/SiteAdaptor/trending/TrendingViewDescriptor.tsx @@ -9,7 +9,9 @@ import { TrendingViewContext } from './context.js' import { PluginDescriptor } from './PluginDescriptor.js' import { Trans } from '@lingui/react/macro' -const useStyles = makeStyles()((theme) => { +const useStyles = makeStyles<{ + isTokenTagPopper: boolean +}>()((theme, props) => { return { source: { display: 'flex', @@ -26,10 +28,10 @@ const useStyles = makeStyles()((theme) => { }, selectedOption: { fontWeight: 700, - color: theme.vars.palette.maskColor.publicMain, + color: props.isTokenTagPopper ? theme.vars.palette.maskColor.main : theme.vars.palette.maskColor.publicMain, }, arrowDropIcon: { - color: theme.vars.palette.maskColor.publicMain, + color: props.isTokenTagPopper ? theme.vars.palette.maskColor.main : theme.vars.palette.maskColor.publicMain, }, } }) @@ -44,7 +46,7 @@ export function TrendingViewDescriptor(props: TrendingViewDescriptorProps) { const { result, resultList, setResult } = props const { isProfilePage, isTokenTagPopper } = useContext(TrendingViewContext) - const { classes } = useStyles() + const { classes } = useStyles({ isTokenTagPopper }) const displayList = uniqBy( resultList.filter((x) => x.type === result.type),