Skip to content

Commit

Permalink
💄 style: Update config
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Sep 30, 2024
1 parent 53242ec commit 2fdd538
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 11 deletions.
3 changes: 3 additions & 0 deletions docs/features/icon-avatar.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ group:
title: Components
order: 10
title: IconAvatar
apiHeader:
docUrl: 'https://github.com/lobehub/lobe-icons/tree/master/docs/features/icon-avatar.md'
sourceUrl: 'https://github.com/lobehub/lobe-icons/tree/master/src/features/IconAvatar/index.tsx'
---

## Default
Expand Down
3 changes: 3 additions & 0 deletions docs/features/icon-combine.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ group:
title: Components
order: 10
title: IconCombine
apiHeader:
docUrl: 'https://github.com/lobehub/lobe-icons/tree/master/docs/features/icon-combine.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/features/IconCombine/index.tsx'
---

## Default
Expand Down
7 changes: 7 additions & 0 deletions docs/features/model-icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
nav: Components
group: Features
title: ModelIcon
apiHeader:
docUrl: 'https://github.com/lobehub/lobe-icons/tree/master/docs/features/model-icon.md'
sourceUrl: 'https://github.com/lobehub/lobe-icons/tree/master/src/features/ModelIcon/index.tsx'
---

## Default
Expand All @@ -23,3 +26,7 @@ title: ModelIcon
## Combine Color

<code src="./demos/model-icon/CombineColor.tsx" center></code>

## Config

- **Config:** <https://github.com/lobehub/lobe-icons/blob/master/src/features/modelConfig.ts>
7 changes: 7 additions & 0 deletions docs/features/model-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
nav: Components
group: Features
title: ModelTag
apiHeader:
docUrl: 'https://github.com/lobehub/lobe-icons/tree/master/docs/features/model-tag.md'
sourceUrl: 'https://github.com/lobehub/lobe-icons/tree/master/src/features/ModelTag/index.tsx'
---

## Default

<code src="./demos/model-tag/index.tsx" center></code>

## Config

- **Config:** <https://github.com/lobehub/lobe-icons/blob/master/src/features/modelConfig.ts>
8 changes: 8 additions & 0 deletions docs/features/provder-icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
nav: Components
group: Features
title: ProviderIcon
apiHeader:
docUrl: 'https://github.com/lobehub/lobe-icons/tree/master/docs/features/provider-icon.md'
sourceUrl: 'https://github.com/lobehub/lobe-icons/tree/master/src/features/ProviderIcon/index.tsx'
---

## Default
Expand All @@ -23,3 +26,8 @@ title: ProviderIcon
## Avatar

<code src="./demos/provider-icon/Avatar.tsx" center></code>

## Config

- **Enum:** <https://github.com/lobehub/lobe-icons/blob/master/src/features/providerEnum.ts>
- **Config:** <https://github.com/lobehub/lobe-icons/blob/master/src/features/providerConfig.tsx>
8 changes: 8 additions & 0 deletions docs/features/provider-combine.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
nav: Components
group: Features
title: ProviderCombine
apiHeader:
docUrl: 'https://github.com/lobehub/lobe-icons/tree/master/docs/features/provider-combine.md'
sourceUrl: 'https://github.com/lobehub/lobe-icons/tree/master/src/features/ProviderCombine/index.tsx'
---

## Default
Expand All @@ -11,3 +14,8 @@ title: ProviderCombine
## Mono

<code src="./demos/provider-combine/Mono.tsx" center></code>

## Config

- **Enum:** <https://github.com/lobehub/lobe-icons/blob/master/src/features/providerEnum.ts>
- **Config:** <https://github.com/lobehub/lobe-icons/blob/master/src/features/providerConfig.tsx>
22 changes: 11 additions & 11 deletions src/features/providerConfig.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DivProps } from '@lobehub/ui';
import { FC } from 'react';
import { FC, memo } from 'react';

import Ai21 from '@/Ai21';
import Ai360 from '@/Ai360';
Expand Down Expand Up @@ -67,21 +67,21 @@ export const providerMappings: ProviderMapping[] = [
{ Icon: LobeHub, keywords: [ModelProvider.LobeHub] },
{ Icon: Zhipu, combineMultiple: 1.25, keywords: [ModelProvider.ZhiPu] },
{
Combine: ({ size = 24, type = 'color', ...props }) => (
Combine: memo(({ size = 24, type = 'color', ...props }) => (
<Combine
left={type === 'color' ? <Aws.Color size={size * 1.2} /> : <Aws size={size * 1.2} />}
right={<Bedrock.Combine size={size} type={type} />}
size={size}
{...props}
/>
),
)),
Icon: Bedrock,
combineMultiple: 1.1,
keywords: [ModelProvider.Bedrock],
},
{ Icon: DeepSeek, combineMultiple: 1.16, keywords: [ModelProvider.DeepSeek] },
{
Combine: ({ size = 24, type = 'color', ...props }) => (
Combine: memo(({ size = 24, type = 'color', ...props }) => (
<Combine
left={
type === 'color' ? (
Expand All @@ -94,20 +94,20 @@ export const providerMappings: ProviderMapping[] = [
size={size}
{...props}
/>
),
)),
Icon: Google,
combineMultiple: 0.92,
keywords: [ModelProvider.Google],
},
{
Combine: ({ size = 24, type = 'color', ...props }) => (
Combine: memo(({ size = 24, type = 'color', ...props }) => (
<Combine
left={<Azure.Combine size={size * 0.92} type={type} />}
right={<OpenAI.Combine size={size} />}
size={size}
{...props}
/>
),
)),
Icon: Azure,
keywords: [ModelProvider.Azure],
},
Expand All @@ -119,14 +119,14 @@ export const providerMappings: ProviderMapping[] = [
{ Icon: Minimax, combineMultiple: 1.3, keywords: [ModelProvider.Minimax] },
{ Icon: Mistral, combineMultiple: 1.08, keywords: [ModelProvider.Mistral] },
{
Combine: ({ size = 24, type = 'color', ...props }) => (
Combine: memo(({ size = 24, type = 'color', ...props }) => (
<Combine
left={<Anthropic.Text size={size * 0.75} />}
right={<Claude.Combine size={size} type={type} />}
size={size}
{...props}
/>
),
)),
Icon: Anthropic,
combineMultiple: 0.83,
keywords: [ModelProvider.Anthropic],
Expand All @@ -149,14 +149,14 @@ export const providerMappings: ProviderMapping[] = [
{ Icon: Doubao, keywords: [ModelProvider.Doubao] },
{ Icon: Hunyuan, keywords: [ModelProvider.Hunyuan] },
{
Combine: ({ size = 24, type = 'color', ...props }) => (
Combine: memo(({ size = 24, type = 'color', ...props }) => (
<Combine
left={<BaiduCloud.Combine size={size * 0.9} type={type} />}
right={<Wenxin.Combine extra={'千帆'} size={size} type={type} {...props} />}
size={size}
{...props}
/>
),
)),
Icon: Wenxin,
keywords: [ModelProvider.Wenxin],
},
Expand Down

0 comments on commit 2fdd538

Please sign in to comment.