feat: components with custom background use transparent background

This commit is contained in:
hamster1963
2024-12-19 10:40:11 +08:00
parent d8c68ffe5f
commit 3d66582a3a
10 changed files with 106 additions and 8 deletions
+7 -1
View File
@@ -29,11 +29,17 @@ export const CycleTransferStatsClient: React.FC<CycleTransferStatsClientProps> =
className,
}) => {
const { t } = useTranslation()
const customBackgroundImage =
// @ts-expect-error ShowNetTransfer is a global variable
(window.CustomBackgroundImage as string) !== "" ? window.CustomBackgroundImage : undefined
return (
<div
className={cn(
"w-full bg-white px-4 py-3 dark:bg-black rounded-lg border bg-card text-card-foreground shadow-lg shadow-neutral-200/40 dark:shadow-none space-y-2",
"w-full bg-white px-4 py-3 rounded-lg border bg-card text-card-foreground shadow-lg shadow-neutral-200/40 dark:shadow-none space-y-2",
className,
{
"bg-card/50": customBackgroundImage,
},
)}
>
{serverStats.map(({ serverId, serverName, transfer, nextUpdate }) => {