Skip to content

Commit b0d5347

Browse files
committed
Resolves #240
1 parent bb4a036 commit b0d5347

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/lazy-baboons-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"ai-elements": patch
3+
---
4+
5+
Fix model selector logos in dark mode

packages/elements/src/model-selector.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
DialogTrigger,
1717
} from "@repo/shadcn-ui/components/ui/dialog";
1818
import { cn } from "@repo/shadcn-ui/lib/utils";
19-
import type { ReactNode, ComponentProps } from "react";
19+
import type { ComponentProps, ReactNode } from "react";
2020

2121
export type ModelSelectorProps = ComponentProps<typeof Dialog>;
2222

@@ -173,7 +173,7 @@ export const ModelSelectorLogo = ({
173173
<img
174174
{...props}
175175
alt={`${provider} logo`}
176-
className={cn("size-3", className)}
176+
className={cn("size-3 dark:invert", className)}
177177
height={12}
178178
src={`https://models.dev/logos/${provider}.svg`}
179179
width={12}
@@ -188,7 +188,7 @@ export const ModelSelectorLogoGroup = ({
188188
}: ModelSelectorLogoGroupProps) => (
189189
<div
190190
className={cn(
191-
"-space-x-1 flex shrink-0 items-center [&>img]:rounded-full [&>img]:bg-background [&>img]:p-px [&>img]:ring-1 [&>img]:ring-border",
191+
"-space-x-1 flex shrink-0 items-center [&>img]:rounded-full [&>img]:bg-background [&>img]:p-px [&>img]:ring-1 dark:[&>img]:bg-foreground",
192192
className
193193
)}
194194
{...props}

0 commit comments

Comments
 (0)