Skip to content

Commit d5090be

Browse files
💄 style: Update GitHub to ProviderIcon
1 parent 6b45a06 commit d5090be

File tree

6 files changed

+35
-13
lines changed

6 files changed

+35
-13
lines changed

‎src/Ai21/components/Combine.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { useTheme } from 'antd-style';
12
import { memo } from 'react';
23

34
import IconCombine, { type IconCombineProps } from '@/IconCombine';
@@ -10,15 +11,18 @@ export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
1011
type: 'mono' | 'color';
1112
}
1213
const Combine = memo<CombineProps>(({ type = 'mono', iconProps, ...rest }) => {
13-
// @ts-ignore
14-
if (type === 'mono') return <Text {...rest} />;
15-
14+
const theme = useTheme();
1615
return (
1716
<IconCombine
1817
Icon={Avatar}
1918
Text={Text}
2019
aria-label={TITLE}
21-
iconProps={{ shape: 'square', ...iconProps }}
20+
iconProps={{
21+
background: type === 'mono' ? theme.colorText : undefined,
22+
color: type === 'mono' ? theme.colorBgLayout : undefined,
23+
shape: 'square',
24+
...iconProps,
25+
}}
2226
spaceMultiple={SPACE_MULTIPLE}
2327
textMultiple={TEXT_MULTIPLE}
2428
{...rest}

‎src/Ai21/style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const TITLE = 'AI21';
2-
export const TEXT_MULTIPLE = 0.7;
2+
export const TEXT_MULTIPLE = 0.75;
33
export const SPACE_MULTIPLE = 0.2;
44
export const COLOR_PRIMARY = '#E91E63';
55
export const COLOR_GRADIENT = 'linear-gradient(-45deg, #F68CB2, #E91E63)';

‎src/Groq/components/Combine.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { useTheme } from 'antd-style';
12
import { memo } from 'react';
23

34
import IconCombine, { type IconCombineProps } from '@/IconCombine';
@@ -10,13 +11,19 @@ export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
1011
type?: 'mono' | 'color';
1112
}
1213

13-
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
14+
const Combine = memo<CombineProps>(({ type = 'mono', iconProps, ...rest }) => {
15+
const theme = useTheme();
1416
return (
1517
<IconCombine
1618
Icon={Avatar}
1719
Text={Text}
1820
aria-label={TITLE}
19-
showLogo={type === 'color'}
21+
iconProps={{
22+
background: type === 'mono' ? theme.colorText : undefined,
23+
color: type === 'mono' ? theme.colorBgLayout : undefined,
24+
shape: 'circle',
25+
...iconProps,
26+
}}
2027
spaceMultiple={SPACE_MULTIPLE}
2128
textMultiple={TEXT_MULTIPLE}
2229
{...rest}

‎src/ProviderCombine/const.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Divider } from 'antd';
33
import { FC, ReactNode, memo } from 'react';
44
import { Flexbox } from 'react-layout-kit';
55

6-
import Ai21 from '@/Ai21'
6+
import Ai21 from '@/Ai21';
77
import Ai360 from '@/Ai360';
88
import AiMass from '@/AiMass';
99
import Anthropic from '@/Anthropic';
@@ -15,6 +15,7 @@ import Claude from '@/Claude';
1515
import DeepSeek from '@/DeepSeek';
1616
import Fireworks from '@/Fireworks';
1717
import Gemini from '@/Gemini';
18+
import Github from '@/Github';
1819
import Google from '@/Google';
1920
import Groq from '@/Groq';
2021
import LobeHub from '@/LobeHub';
@@ -140,5 +141,6 @@ export const providerMappings: ProviderMapping[] = [
140141
{ Icon: Novita.Combine, keywords: [ModelProvider.Novita], multiple: 0.95 },
141142
{ Icon: SiliconCloud.Combine, keywords: [ModelProvider.SiliconCloud], multiple: 0.75 },
142143
{ Icon: Upstage.Combine, keywords: [ModelProvider.Upstage], multiple: 0.9 },
143-
{ Icon: Ai21.Combine, keywords: [ModelProvider.Ai21] },
144+
{ Icon: Ai21.Combine, keywords: [ModelProvider.Ai21], multiple: 0.9 },
145+
{ Icon: Github.Combine, keywords: [ModelProvider.Github], multiple: 0.95 },
144146
];

‎src/ProviderIcon/const.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Baichuan from '@/Baichuan';
99
import Bedrock from '@/Bedrock';
1010
import DeepSeek from '@/DeepSeek';
1111
import Fireworks from '@/Fireworks';
12+
import Github from '@/Github';
1213
import Google from '@/Google';
1314
import Groq from '@/Groq';
1415
import type { IconAvatarProps } from '@/IconAvatar';
@@ -56,6 +57,7 @@ export enum ModelProvider {
5657
Bedrock = 'bedrock',
5758
DeepSeek = 'deepseek',
5859
FireworksAI = 'fireworksai',
60+
Github = 'github',
5961
Google = 'google',
6062
Groq = 'groq',
6163
LobeHub = 'lobehub',
@@ -109,4 +111,5 @@ export const providerMappings: ProviderMapping[] = [
109111
{ Icon: SiliconCloud, keywords: [ModelProvider.SiliconCloud] },
110112
{ Icon: Upstage, keywords: [ModelProvider.Upstage] },
111113
{ Icon: Ai21, keywords: [ModelProvider.Ai21] },
114+
{ Icon: Github, keywords: [ModelProvider.Github] },
112115
];

‎src/ZeroOne/components/Combine.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
1+
import { useTheme } from 'antd-style';
12
import { memo } from 'react';
23

34
import IconCombine, { type IconCombineProps } from '@/IconCombine';
45

56
import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
67
import Avatar from './Avatar';
7-
import Mono from './Mono';
88
import Text from './Text';
99

1010
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
1111
type?: 'mono' | 'color';
1212
}
1313

14-
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
14+
const Combine = memo<CombineProps>(({ type = 'mono', iconProps, ...rest }) => {
15+
const theme = useTheme();
1516
return (
1617
<IconCombine
17-
Icon={type === 'mono' ? Mono : Avatar}
18+
Icon={Avatar}
1819
Text={Text}
1920
aria-label={TITLE}
20-
iconProps={{ shape: 'square' }}
21+
iconProps={{
22+
background: type === 'mono' ? theme.colorText : undefined,
23+
color: type === 'mono' ? theme.colorBgLayout : undefined,
24+
shape: 'square',
25+
...iconProps,
26+
}}
2127
spaceMultiple={SPACE_MULTIPLE}
2228
textMultiple={TEXT_MULTIPLE}
2329
{...rest}

0 commit comments

Comments
 (0)