-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d1ad08
commit 509d749
Showing
9 changed files
with
223 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use client'; | ||
|
||
import { memo } from 'react'; | ||
|
||
import IconAvatar, { type IconAvatarProps } from '@/features/IconAvatar'; | ||
|
||
import { COLOR_PRIMARY, TITLE } from '../style'; | ||
import Mono from './Mono'; | ||
|
||
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>; | ||
|
||
const Avatar = memo<AvatarProps>(({ background, ...rest }) => { | ||
return ( | ||
<IconAvatar | ||
Icon={Mono} | ||
aria-label={TITLE} | ||
background={background || COLOR_PRIMARY} | ||
color={'#fff'} | ||
iconMultiple={0.6} | ||
{...rest} | ||
/> | ||
); | ||
}); | ||
|
||
export default Avatar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use client'; | ||
|
||
import { memo } from 'react'; | ||
|
||
import IconCombine, { type IconCombineProps } from '@/features/IconCombine'; | ||
|
||
import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style'; | ||
import Mono from './Mono'; | ||
import Text from './Text'; | ||
|
||
export type CombineProps = Omit<IconCombineProps, 'Icon' | 'Text'>; | ||
|
||
const Combine = memo<CombineProps>(({ ...rest }) => { | ||
return ( | ||
<IconCombine | ||
Icon={Mono} | ||
Text={Text} | ||
aria-label={TITLE} | ||
iconProps={{ shape: 'square' }} | ||
spaceMultiple={SPACE_MULTIPLE} | ||
textMultiple={TEXT_MULTIPLE} | ||
{...rest} | ||
/> | ||
); | ||
}); | ||
|
||
export default Combine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use client'; | ||
|
||
import { forwardRef } from 'react'; | ||
|
||
import type { IconType } from '@/types'; | ||
|
||
import { TITLE } from '../style'; | ||
|
||
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} | ||
> | ||
<title>{TITLE}</title> | ||
<path | ||
clipRule="evenodd" | ||
d="M0 4.68L8.61 0l3.583 2.004 3.1-1.735L24 5.14v8.701l-3.582 2.004v3.469L12.038 24l-8.482-4.52v-3.847L0 13.9V4.68zm1.284 1.472v2.934l7.936 4.098-.032 1.419-7.904-4.08v2.658l10.043 5.303V11.77L1.284 6.152zm10.741 4.532l9.791-5.33-2.63-1.47-7.398 4.137-1.251-.736 7.366-4.12-2.61-1.46-9.806 5.34 6.538 3.64zM4.2 6.328l6.709-3.606L8.61 1.436l-6.714 3.61L4.2 6.327zm11.04 14.444l-2.618 1.465V11.94l6.512-3.642v10.298l-2.61 1.46v-8.241l-1.283.682v8.277zm-10.4-4.42l6.487 3.568v2.23L4.84 18.763v-2.41zm17.876-3.23v-6.83L20.418 7.58v6.829l2.298-1.286z" | ||
/> | ||
</svg> | ||
); | ||
}); | ||
|
||
export default Icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use client'; | ||
|
||
import { forwardRef } from 'react'; | ||
|
||
import type { IconType } from '@/types'; | ||
|
||
import { TITLE } from '../style'; | ||
|
||
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 97 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...rest} | ||
> | ||
<title>{TITLE}</title> | ||
<path d="M15.49 2H2v4.616h11.597a1.539 1.539 0 010 3.076H2v4.616h11.597a1.54 1.54 0 010 3.076H2V22h13.49a6.151 6.151 0 004.802-10A6.154 6.154 0 0015.49 2zM95.362 2h-6.965v20h6.965V2zM73.42 2h-6.966l-8.562 20h6.963l5.086-11.876L75.026 22h6.965L73.427 2h-.008zM43.706 2h-6.965l-8.564 20h6.965l5.085-11.876L45.313 22h6.965L43.713 2h-.007z" /> | ||
</svg> | ||
); | ||
}); | ||
|
||
export default Icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
nav: Components | ||
group: Model | ||
title: BAAI (智源研究院) | ||
atomId: BAAI | ||
description: https://baai.ac.cn | ||
--- | ||
|
||
## Icons | ||
|
||
```tsx | ||
import { BAAI } from '@lobehub/icons'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
export default () => <BAAI size={64} />; | ||
``` | ||
|
||
## Text | ||
|
||
```tsx | ||
import { BAAI } from '@lobehub/icons'; | ||
|
||
export default () => <BAAI.Text size={48} />; | ||
``` | ||
|
||
## Combine | ||
|
||
```tsx | ||
import { BAAI } from '@lobehub/icons'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
export default () => ( | ||
<Flexbox gap={16} align={'flex-start'}> | ||
<BAAI.Combine size={64} /> | ||
</Flexbox> | ||
); | ||
``` | ||
|
||
## Avatars | ||
|
||
```tsx | ||
import { BAAI } from '@lobehub/icons'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
export default () => ( | ||
<Flexbox gap={16} horizontal> | ||
<BAAI.Avatar size={64} /> | ||
<BAAI.Avatar size={64} shape={'square'} /> | ||
</Flexbox> | ||
); | ||
``` | ||
|
||
## Colors | ||
|
||
```tsx | ||
import { BAAI } from '@lobehub/icons'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
import ColorPreview from '../components/ColorPreview'; | ||
|
||
export default () => ( | ||
<Flexbox gap={16} horizontal> | ||
<ColorPreview color={BAAI.colorPrimary} /> | ||
</Flexbox> | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use client'; | ||
|
||
import Avatar from './components/Avatar'; | ||
import Combine from './components/Combine'; | ||
import Mono from './components/Mono'; | ||
import Text from './components/Text'; | ||
import { COLOR_PRIMARY, TITLE } from './style'; | ||
|
||
export type CompoundedIcon = typeof Mono & { | ||
Avatar: typeof Avatar; | ||
Combine: typeof Combine; | ||
Text: typeof Text; | ||
colorPrimary: string; | ||
title: string; | ||
}; | ||
|
||
const Icons = Mono as CompoundedIcon; | ||
Icons.Text = Text; | ||
Icons.Combine = Combine; | ||
Icons.Avatar = Avatar; | ||
Icons.colorPrimary = COLOR_PRIMARY; | ||
Icons.title = TITLE; | ||
export default Icons; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const TITLE = 'BAAI'; | ||
export const TEXT_MULTIPLE = 0.7; | ||
export const SPACE_MULTIPLE = 0.3; | ||
export const COLOR_PRIMARY = '#000'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters