Skip to content

Commit

Permalink
✨ feat: Add more llm brands
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jan 31, 2024
1 parent 1d6a383 commit 62ba9c5
Show file tree
Hide file tree
Showing 48 changed files with 1,160 additions and 29 deletions.
4 changes: 0 additions & 4 deletions src/Anthropic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,3 @@ export default () => (
</Flexbox>
);
```

## APIs

<API></API>
14 changes: 14 additions & 0 deletions src/Baichuan/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { memo } from 'react';

import IconAvatar, { type IconAvatarProps } from '@/IconAvatar';

import { COLOR_GRADIENT } from '../style';
import Mono from './Mono';

export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;

const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
return <IconAvatar Icon={Mono} background={background || COLOR_GRADIENT} {...rest} />;
});

export default Avatar;
42 changes: 42 additions & 0 deletions src/Baichuan/components/Color.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { forwardRef } from 'react';

import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2z" fill="url(#a)"></path>
<path d="M14.667 2h-5.2v20h5.2V2z" fill="url(#b)"></path>
<path d="M16.8 7.733H22V22h-5.2V7.733z" fill="url(#c)"></path>
<path d="M22 2h-5.2v4.133H22V2z" fill="url(#d)"></path>
<defs>
<linearGradient gradientUnits="userSpaceOnUse" id="a" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="b" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="c" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="d" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
</defs>
</svg>
);
});

export default Icon;
28 changes: 28 additions & 0 deletions src/Baichuan/components/Combine.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { memo } from 'react';

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

import { SPACE_MULTIPLE, TEXT_MULTIPLE } from '../style';
import Color from './Color';
import Mono from './Mono';
import Text from './Text';

export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
type?: 'color' | 'mono';
}
const Combine = memo<CombineProps>(({ type = 'mono', extraStyle, ...rest }) => {
const Icon = type === 'color' ? Color : Mono;

return (
<IconCombine
Icon={Icon}
Text={Text}
extraStyle={{ fontWeight: 500, ...extraStyle }}
spaceMultiple={SPACE_MULTIPLE}
textMultiple={TEXT_MULTIPLE}
{...rest}
/>
);
});

export default Combine;
44 changes: 44 additions & 0 deletions src/Baichuan/components/Mono.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { forwardRef } from 'react';

import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
fill="currentColor"
fillRule="evenodd"
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path d="M7.333 2h-3.2l-2 4.333V17.8L0 22h5.2l2.028-4.2L7.333 2z"></path>
<path d="M14.667 2h-5.2v20h5.2V2z"></path>
<path d="M16.8 7.733H22V22h-5.2V7.733z"></path>
<path d="M22 2h-5.2v4.133H22V2z"></path>
<defs>
<linearGradient gradientUnits="userSpaceOnUse" id="a" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="b" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="c" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
<linearGradient gradientUnits="userSpaceOnUse" id="d" x1="0" x2="24.091" y1="2" y2="23.818">
<stop stopColor="#FEC13E"></stop>
<stop offset="1" stopColor="#FF6933"></stop>
</linearGradient>
</defs>
</svg>
);
});

export default Icon;
26 changes: 26 additions & 0 deletions src/Baichuan/components/Text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { forwardRef } from 'react';

import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
fill="currentColor"
fillRule="evenodd"
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, width: 'fit-content', ...style }}
viewBox="0 0 45 24"
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path
clipRule="evenodd"
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"
></path>
<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>
</svg>
);
});

export default Icon;
74 changes: 74 additions & 0 deletions src/Baichuan/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
nav: Components
group: Icons
title: Baichuan (百川)
atomId: Baichuan
description: https://www.baichuan-ai.com
---

## Icons

```tsx
import { Baichuan } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16} horizontal>
<Baichuan size={64} />
<Baichuan.Color size={64} />
</Flexbox>
);
```

## Text

```tsx
import { Baichuan } from '@lobehub/icons';

export default () => <Baichuan.Text size={48} />;
```

## Combine

```tsx
import { Baichuan } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16}>
<Baichuan.Combine size={64} />
<Baichuan.Combine size={64} type={'color'} />
<Baichuan.Combine size={64} type={'color'} color={Baichuan.colorPrimary} />
</Flexbox>
);
```

## Avatars

```tsx
import { Baichuan } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16} horizontal>
<Baichuan.Avatar size={64} background={Baichuan.colorPrimary} />
<Baichuan.Avatar size={64} />
<Baichuan.Avatar size={64} shape={'square'} />
</Flexbox>
);
```

## Colors

```tsx
import { Baichuan } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

import ColorPreview from '../components/ColorPreview';

export default () => (
<Flexbox gap={16} horizontal>
<ColorPreview color={Baichuan.colorPrimary} />
</Flexbox>
);
```
25 changes: 25 additions & 0 deletions src/Baichuan/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Avatar from './components/Avatar';
import Color from './components/Color';
import Combine from './components/Combine';
import Mono from './components/Mono';
import Text from './components/Text';
import { COLOR_PRIMARY } from './style';

export type CompoundedIcon = typeof Mono & {
Avatar: typeof Avatar;
Color: typeof Color;
Combine: typeof Combine;
Mono: typeof Mono;
Text: typeof Text;

colorPrimary: string;
};

const Icons = Mono as CompoundedIcon;
Icons.Color = Color;
Icons.Text = Text;
Icons.Combine = Combine;
Icons.Avatar = Avatar;
Icons.colorPrimary = COLOR_PRIMARY;

export default Icons;
4 changes: 4 additions & 0 deletions src/Baichuan/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const TEXT_MULTIPLE = 1;
export const SPACE_MULTIPLE = 0.2;
export const COLOR_PRIMARY = '#FF6933';
export const COLOR_GRADIENT = 'linear-gradient(-45deg, #FF6933, #FEC13E)';
4 changes: 0 additions & 4 deletions src/ChatGLM/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,3 @@ export default () => (
</Flexbox>
);
```

## APIs

<API></API>
14 changes: 14 additions & 0 deletions src/Cohere/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { memo } from 'react';

import IconAvatar, { type IconAvatarProps } from '@/IconAvatar';

import { COLOR_PRIMARY } from '../style';
import Mono from './Mono';

export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;

const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
return <IconAvatar Icon={Mono} background={background || COLOR_PRIMARY} {...rest} />;
});

export default Avatar;
36 changes: 36 additions & 0 deletions src/Cohere/components/Color.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { forwardRef } from 'react';

import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path
clipRule="evenodd"
d="M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z"
fill="#39594D"
fillRule="evenodd"
></path>
<path
clipRule="evenodd"
d="M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z"
fill="#D18EE2"
fillRule="evenodd"
></path>
<path
d="M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z"
fill="#FF7759"
></path>
</svg>
);
});

export default Icon;
28 changes: 28 additions & 0 deletions src/Cohere/components/Combine.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { memo } from 'react';

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

import { SPACE_MULTIPLE, TEXT_MULTIPLE } from '../style';
import Color from './Color';
import Mono from './Mono';
import Text from './Text';

export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
type?: 'color' | 'mono';
}
const Combine = memo<CombineProps>(({ type = 'mono', extraStyle, ...rest }) => {
const Icon = type === 'color' ? Color : Mono;

return (
<IconCombine
Icon={Icon}
Text={Text}
extraStyle={{ fontWeight: 500, ...extraStyle }}
spaceMultiple={SPACE_MULTIPLE}
textMultiple={TEXT_MULTIPLE}
{...rest}
/>
);
});

export default Combine;
31 changes: 31 additions & 0 deletions src/Cohere/components/Mono.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { forwardRef } from 'react';

import type { IconType } from '@/types';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
fill="currentColor"
fillRule="evenodd"
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path
clipRule="evenodd"
d="M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z"
></path>
<path
clipRule="evenodd"
d="M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z"
></path>
<path d="M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z"></path>
</svg>
);
});

export default Icon;
Loading

0 comments on commit 62ba9c5

Please sign in to comment.