Skip to content

Commit be7759d

Browse files
committed
[TOOL-3075] Dashboard: Adjust theming, Improved light mode (#5956)
Fix "inverted look" of light mode - light mode now correctly has a slightly dark background and lighter cards on top * Instead of `bg-muted/50`, use `bg-card` instead. `--card` color is updated * For cards that are links, don't change the background color on hover - apply a subtle border change instead - added a `--active-border` for this - this looks great in both light and dark mode * Prefer using `bg-accent` for hover effects instead of `bg-muted` (even though they are currently both same color) for adding hover accent. Use `bg-accent/50` for applying a very subtle accent - use cases: clickable table row <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the styles of various components in the application to replace the `bg-muted` class with `bg-card`, enhancing the visual consistency across the UI. ### Detailed summary - Changed `className` from `bg-muted/50` to `bg-card` in multiple components. - Updated hover effects from `hover:bg-muted` to `hover:bg-card`. - Modified background colors in various layouts to use `bg-card` instead of `bg-muted`. - Adjusted button and input styles for consistent theming. > The following files were skipped due to too many changes: `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx`, `apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx`, `apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/[blueprint_slug]/blueprint-playground.client.tsx`, `apps/dashboard/src/@/styles/globals.css`, `apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/embed/embed-setup.tsx`, `apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsx`, `apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/client/filters.tsx`, `apps/dashboard/src/app/components/sdk-component-theme.ts`, `apps/dashboard/src/components/settings/ApiKeys/Create/index.tsx`, `apps/dashboard/src/app/team/components/Analytics/EmptyState.tsx`, `apps/dashboard/src/components/settings/Account/Billing/CreditsItem.tsx` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 15178b2 commit be7759d

File tree

147 files changed

+403
-375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+403
-375
lines changed

apps/dashboard/src/@/components/blocks/Avatars/ProjectAvatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function ProjectAvatar(props: {
1212
className={cn("rounded-lg border border-border", props.className)}
1313
alt={""}
1414
fallback={
15-
<div className="flex items-center justify-center bg-muted/50">
15+
<div className="flex items-center justify-center bg-card">
1616
<BoxIcon className="size-[50%] text-muted-foreground" />
1717
</div>
1818
}

apps/dashboard/src/@/components/blocks/DangerSettingCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function DangerSettingCard(props: {
3030
return (
3131
<div
3232
className={cn(
33-
"overflow-hidden rounded-lg border border-red-500/70",
33+
"overflow-hidden rounded-lg border border-red-500/70 bg-card",
3434
props.className,
3535
)}
3636
>

apps/dashboard/src/@/components/blocks/Img.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function Img(props: imgElementProps) {
2525
: _status;
2626
const { className, fallback, skeleton, ...restProps } = props;
2727
const defaultSkeleton = <div className="animate-pulse bg-accent" />;
28-
const defaultFallback = <div className="bg-muted" />;
28+
const defaultFallback = <div className="bg-accent" />;
2929
const imgRef = useRef<HTMLImageElement>(null);
3030

3131
useIsomorphicLayoutEffect(() => {

apps/dashboard/src/@/components/blocks/MobileSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function MobileSidebar(props: {
4747
const defaultTrigger = (
4848
<Button
4949
className={cn(
50-
"w-full justify-between gap-2 bg-muted/50 text-left lg:hidden",
50+
"w-full justify-between gap-2 bg-card text-left lg:hidden",
5151
props.triggerClassName,
5252
)}
5353
variant="outline"

apps/dashboard/src/@/components/blocks/SettingsCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function SettingsCard(
3030
}>,
3131
) {
3232
return (
33-
<div className="relative rounded-lg border border-border bg-muted/50">
33+
<div className="relative rounded-lg border border-border bg-card">
3434
<div
3535
className={cn(
3636
"relative border-border border-b px-4 py-6 lg:px-6",

apps/dashboard/src/@/components/blocks/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function RenderSidebarLinks(props: { links: SidebarLink[] }) {
6767
// biome-ignore lint/suspicious/noArrayIndexKey: items won't be reordered
6868
key={i}
6969
href={link.href}
70-
className="flex items-center gap-2 rounded-md px-3 py-2 text-muted-foreground text-sm hover:bg-muted"
70+
className="flex items-center gap-2 rounded-md px-3 py-2 text-muted-foreground text-sm hover:bg-accent"
7171
activeClassName="text-foreground"
7272
exactMatch={link.exactMatch}
7373
>

apps/dashboard/src/@/components/blocks/app-footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function AppFooter(props: AppFooterProps) {
1919
return (
2020
<footer
2121
className={cn(
22-
"w-full border-border border-t bg-muted/50 py-6 md:py-8",
22+
"w-full border-border border-t bg-card py-6 md:py-8",
2323
props.className,
2424
)}
2525
>

apps/dashboard/src/@/components/blocks/error-fallbacks/unexpect-value-error-message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function UnexpectedValueErrorMessage(props: {
2323
{stringifiedValue && (
2424
<div className="mt-3">
2525
<p className="mb-0.5 text-muted-foreground text-sm">Value Received</p>
26-
<ScrollShadow className="rounded-lg bg-muted/50">
26+
<ScrollShadow className="rounded-lg bg-card">
2727
<code className="block whitespace-pre p-4 font-mono text-xs">
2828
{stringifiedValue}
2929
</code>

apps/dashboard/src/@/components/blocks/multi-select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(
202202
event.stopPropagation();
203203
handleClear();
204204
}}
205-
className="rounded p-1 hover:bg-muted"
205+
className="rounded p-1 hover:bg-accent"
206206
>
207207
<XIcon className="h-4 cursor-pointer text-muted-foreground" />
208208
</div>

apps/dashboard/src/@/components/blocks/pricing-card.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ export const PricingCard: React.FC<PricingCardProps> = ({
5757
return (
5858
<div
5959
className={cn(
60-
"z-[999] flex w-full flex-col gap-6 rounded-xl border border-border bg-muted/50 p-4 md:p-6",
60+
"z-10 flex w-full flex-col gap-6 rounded-xl border border-border bg-card p-4 md:p-6",
6161
current && "border-blue-500",
62+
highlighted && "border-active-border",
6263
)}
6364
style={
6465
highlighted

0 commit comments

Comments
 (0)