The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix: make models.dev provider logos theme-aware (#19225)
nitinc854d28d6053
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/ModelsDevProviderLogo.tsx b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/ModelsDevProviderLogo.tsxindex ba99d171b14..263b0de39ed 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/ai/components/ModelsDevProviderLogo.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/ai/components/ModelsDevProviderLogo.tsx@@ -1,5 +1,7 @@import { styled } from '@linaria/react';+import { useContext } from 'react';import { type IconComponentProps } from 'twenty-ui/display';+import { ThemeContext } from 'twenty-ui/theme-constants';type ModelsDevProviderLogoProps = {logoUrl: string;@@ -30,7 +32,9 @@ export const ModelsDevProviderLogo = ({className,style,}: ModelsDevProviderLogoProps) => {+ const { theme } = useContext(ThemeContext);const pixelSize = resolvePixelSize(size);+ const isLightTheme = theme.name === 'light';return (<StyledLogo@@ -38,7 +42,10 @@ export const ModelsDevProviderLogo = ({className={className}height={pixelSize}src={logoUrl}- style={style}+ style={{+ ...style,+ filter: isLightTheme ? 'none' : 'invert(1)',+ }}width={pixelSize}/>);