Skip to content

Commit 62ba9c5

Browse files
✨ feat: Add more llm brands
1 parent 1d6a383 commit 62ba9c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1160
-29
lines changed

src/Anthropic/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,3 @@ export default () => (
5151
</Flexbox>
5252
);
5353
```
54-
55-
## APIs
56-
57-
<API></API>

src/Baichuan/components/Avatar.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { memo } from 'react';
2+
3+
import IconAvatar, { type IconAvatarProps } from '@/IconAvatar';
4+
5+
import { COLOR_GRADIENT } from '../style';
6+
import Mono from './Mono';
7+
8+
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
9+
10+
const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
11+
return <IconAvatar Icon={Mono} background={background || COLOR_GRADIENT} {...rest} />;
12+
});
13+
14+
export default Avatar;

src/Baichuan/components/Color.tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { forwardRef } from 'react';
2+
3+
import type { IconType } from '@/types';
4+
5+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
6+
return (
7+
<svg
8+
height={size}
9+
ref={ref}
10+
style={{ flex: 'none', lineHeight: 1, ...style }}
11+
viewBox="0 0 24 24"
12+
width={size}
13+
xmlns="http://www.w3.org/2000/svg"
14+
{...rest}
15+
>
16+
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2z" fill="url(#a)"></path>
17+
<path d="M14.667 2h-5.2v20h5.2V2z" fill="url(#b)"></path>
18+
<path d="M16.8 7.733H22V22h-5.2V7.733z" fill="url(#c)"></path>
19+
<path d="M22 2h-5.2v4.133H22V2z" fill="url(#d)"></path>
20+
<defs>
21+
<linearGradient gradientUnits="userSpaceOnUse" id="a" x1="0" x2="24.091" y1="2" y2="23.818">
22+
<stop stopColor="#FEC13E"></stop>
23+
<stop offset="1" stopColor="#FF6933"></stop>
24+
</linearGradient>
25+
<linearGradient gradientUnits="userSpaceOnUse" id="b" x1="0" x2="24.091" y1="2" y2="23.818">
26+
<stop stopColor="#FEC13E"></stop>
27+
<stop offset="1" stopColor="#FF6933"></stop>
28+
</linearGradient>
29+
<linearGradient gradientUnits="userSpaceOnUse" id="c" x1="0" x2="24.091" y1="2" y2="23.818">
30+
<stop stopColor="#FEC13E"></stop>
31+
<stop offset="1" stopColor="#FF6933"></stop>
32+
</linearGradient>
33+
<linearGradient gradientUnits="userSpaceOnUse" id="d" x1="0" x2="24.091" y1="2" y2="23.818">
34+
<stop stopColor="#FEC13E"></stop>
35+
<stop offset="1" stopColor="#FF6933"></stop>
36+
</linearGradient>
37+
</defs>
38+
</svg>
39+
);
40+
});
41+
42+
export default Icon;

src/Baichuan/components/Combine.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { memo } from 'react';
2+
3+
import IconCombine, { type IconCombineProps } from '@/IconCombine';
4+
5+
import { SPACE_MULTIPLE, TEXT_MULTIPLE } from '../style';
6+
import Color from './Color';
7+
import Mono from './Mono';
8+
import Text from './Text';
9+
10+
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
11+
type?: 'color' | 'mono';
12+
}
13+
const Combine = memo<CombineProps>(({ type = 'mono', extraStyle, ...rest }) => {
14+
const Icon = type === 'color' ? Color : Mono;
15+
16+
return (
17+
<IconCombine
18+
Icon={Icon}
19+
Text={Text}
20+
extraStyle={{ fontWeight: 500, ...extraStyle }}
21+
spaceMultiple={SPACE_MULTIPLE}
22+
textMultiple={TEXT_MULTIPLE}
23+
{...rest}
24+
/>
25+
);
26+
});
27+
28+
export default Combine;

src/Baichuan/components/Mono.tsx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { forwardRef } from 'react';
2+
3+
import type { IconType } from '@/types';
4+
5+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
6+
return (
7+
<svg
8+
fill="currentColor"
9+
fillRule="evenodd"
10+
height={size}
11+
ref={ref}
12+
style={{ flex: 'none', lineHeight: 1, ...style }}
13+
viewBox="0 0 24 24"
14+
width={size}
15+
xmlns="http://www.w3.org/2000/svg"
16+
{...rest}
17+
>
18+
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2z"></path>
19+
<path d="M14.667 2h-5.2v20h5.2V2z"></path>
20+
<path d="M16.8 7.733H22V22h-5.2V7.733z"></path>
21+
<path d="M22 2h-5.2v4.133H22V2z"></path>
22+
<defs>
23+
<linearGradient gradientUnits="userSpaceOnUse" id="a" x1="0" x2="24.091" y1="2" y2="23.818">
24+
<stop stopColor="#FEC13E"></stop>
25+
<stop offset="1" stopColor="#FF6933"></stop>
26+
</linearGradient>
27+
<linearGradient gradientUnits="userSpaceOnUse" id="b" x1="0" x2="24.091" y1="2" y2="23.818">
28+
<stop stopColor="#FEC13E"></stop>
29+
<stop offset="1" stopColor="#FF6933"></stop>
30+
</linearGradient>
31+
<linearGradient gradientUnits="userSpaceOnUse" id="c" x1="0" x2="24.091" y1="2" y2="23.818">
32+
<stop stopColor="#FEC13E"></stop>
33+
<stop offset="1" stopColor="#FF6933"></stop>
34+
</linearGradient>
35+
<linearGradient gradientUnits="userSpaceOnUse" id="d" x1="0" x2="24.091" y1="2" y2="23.818">
36+
<stop stopColor="#FEC13E"></stop>
37+
<stop offset="1" stopColor="#FF6933"></stop>
38+
</linearGradient>
39+
</defs>
40+
</svg>
41+
);
42+
});
43+
44+
export default Icon;

src/Baichuan/components/Text.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { forwardRef } from 'react';
2+
3+
import type { IconType } from '@/types';
4+
5+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
6+
return (
7+
<svg
8+
fill="currentColor"
9+
fillRule="evenodd"
10+
height={size}
11+
ref={ref}
12+
style={{ flex: 'none', lineHeight: 1, width: 'fit-content', ...style }}
13+
viewBox="0 0 45 24"
14+
xmlns="http://www.w3.org/2000/svg"
15+
{...rest}
16+
>
17+
<path
18+
clipRule="evenodd"
19+
d="M2 2v2.712h8.136L9.57 7.198H4.26v14.576h2.712v-1.356h9.717v1.356h2.938V7.198H12.51l.677-2.486h8.362V2H2zm4.972 16.045v-2.938h9.717v2.825l-9.717.113zm0-8.361v2.937l9.717-.113V9.684H6.972z"
20+
></path>
21+
<path d="M28.893 2.113h-2.825v10.735c0 1.92-1.133 4.988-2.712 7.231L25.729 22c1.873-2.578 3.164-6.667 3.164-8.927V2.113zM32.96 3.017h2.712v16.61h-2.711V3.017zM42.452 2H39.74v19.661h2.712V2z"></path>
22+
</svg>
23+
);
24+
});
25+
26+
export default Icon;

src/Baichuan/index.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
nav: Components
3+
group: Icons
4+
title: Baichuan (百川)
5+
atomId: Baichuan
6+
description: https://www.baichuan-ai.com
7+
---
8+
9+
## Icons
10+
11+
```tsx
12+
import { Baichuan } from '@lobehub/icons';
13+
import { Flexbox } from 'react-layout-kit';
14+
15+
export default () => (
16+
<Flexbox gap={16} horizontal>
17+
<Baichuan size={64} />
18+
<Baichuan.Color size={64} />
19+
</Flexbox>
20+
);
21+
```
22+
23+
## Text
24+
25+
```tsx
26+
import { Baichuan } from '@lobehub/icons';
27+
28+
export default () => <Baichuan.Text size={48} />;
29+
```
30+
31+
## Combine
32+
33+
```tsx
34+
import { Baichuan } from '@lobehub/icons';
35+
import { Flexbox } from 'react-layout-kit';
36+
37+
export default () => (
38+
<Flexbox gap={16}>
39+
<Baichuan.Combine size={64} />
40+
<Baichuan.Combine size={64} type={'color'} />
41+
<Baichuan.Combine size={64} type={'color'} color={Baichuan.colorPrimary} />
42+
</Flexbox>
43+
);
44+
```
45+
46+
## Avatars
47+
48+
```tsx
49+
import { Baichuan } from '@lobehub/icons';
50+
import { Flexbox } from 'react-layout-kit';
51+
52+
export default () => (
53+
<Flexbox gap={16} horizontal>
54+
<Baichuan.Avatar size={64} background={Baichuan.colorPrimary} />
55+
<Baichuan.Avatar size={64} />
56+
<Baichuan.Avatar size={64} shape={'square'} />
57+
</Flexbox>
58+
);
59+
```
60+
61+
## Colors
62+
63+
```tsx
64+
import { Baichuan } from '@lobehub/icons';
65+
import { Flexbox } from 'react-layout-kit';
66+
67+
import ColorPreview from '../components/ColorPreview';
68+
69+
export default () => (
70+
<Flexbox gap={16} horizontal>
71+
<ColorPreview color={Baichuan.colorPrimary} />
72+
</Flexbox>
73+
);
74+
```

src/Baichuan/index.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import Avatar from './components/Avatar';
2+
import Color from './components/Color';
3+
import Combine from './components/Combine';
4+
import Mono from './components/Mono';
5+
import Text from './components/Text';
6+
import { COLOR_PRIMARY } from './style';
7+
8+
export type CompoundedIcon = typeof Mono & {
9+
Avatar: typeof Avatar;
10+
Color: typeof Color;
11+
Combine: typeof Combine;
12+
Mono: typeof Mono;
13+
Text: typeof Text;
14+
15+
colorPrimary: string;
16+
};
17+
18+
const Icons = Mono as CompoundedIcon;
19+
Icons.Color = Color;
20+
Icons.Text = Text;
21+
Icons.Combine = Combine;
22+
Icons.Avatar = Avatar;
23+
Icons.colorPrimary = COLOR_PRIMARY;
24+
25+
export default Icons;

src/Baichuan/style.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const TEXT_MULTIPLE = 1;
2+
export const SPACE_MULTIPLE = 0.2;
3+
export const COLOR_PRIMARY = '#FF6933';
4+
export const COLOR_GRADIENT = 'linear-gradient(-45deg, #FF6933, #FEC13E)';

src/ChatGLM/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,3 @@ export default () => (
7272
</Flexbox>
7373
);
7474
```
75-
76-
## APIs
77-
78-
<API></API>

0 commit comments

Comments
 (0)