@@ -4,15 +4,6 @@ import { type ProviderDriverKind } from "@t3tools/contracts";
44import { PROVIDER_ICON_BY_PROVIDER } from "./providerIconUtils" ;
55import { cn } from "~/lib/utils" ;
66
7- const NEUTRAL_BADGE_SURFACE = {
8- backgroundImage : [
9- "linear-gradient(var(--muted), var(--muted))" ,
10- "linear-gradient(var(--card), var(--card))" ,
11- "linear-gradient(var(--background), var(--background))" ,
12- "linear-gradient(Canvas, Canvas)" ,
13- ] . join ( ", " ) ,
14- } satisfies CSSProperties ;
15-
167export function providerInstanceInitials ( label : string ) : string {
178 const words = label . replace ( / [ _ - ] + / g, " " ) . split ( / \s + / u) . filter ( Boolean ) ;
189 if ( words . length === 0 ) return "" ;
@@ -41,11 +32,6 @@ export const ProviderInstanceIcon = memo(function ProviderInstanceIcon(props: {
4132 ? ( { "--provider-accent" : props . accentColor } as CSSProperties )
4233 : undefined ;
4334 const badgeContent = props . badgeContent ?? "initials" ;
44- // Stack the theme surfaces over Canvas so the badge always occludes the glyph.
45- // Imported themes may make any individual surface translucent.
46- const badgeSurface : CSSProperties | undefined = props . accentColor
47- ? undefined
48- : NEUTRAL_BADGE_SURFACE ;
4935
5036 return (
5137 < span
@@ -82,7 +68,7 @@ export const ProviderInstanceIcon = memo(function ProviderInstanceIcon(props: {
8268 : "bg-card text-muted-foreground" ,
8369 props . badgeClassName ,
8470 ) }
85- style = { { borderColor : indicatorBackground , ... badgeSurface } }
71+ style = { { borderColor : indicatorBackground } }
8672 aria-hidden
8773 >
8874 { badgeContent === "initials" ? providerInstanceInitials ( props . displayName ) : null }
0 commit comments