forked from lobehub/lobe-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat: Add ModelIcon and Provider Icon
- Loading branch information
1 parent
9c348cb
commit 7e31862
Showing
54 changed files
with
1,091 additions
and
92 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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export const TITLE = '紫东太初'; | ||
export const TEXT_MULTIPLE = 0.6; | ||
export const TEXT_MULTIPLE = 0.65; | ||
export const SPACE_MULTIPLE = 0.2; | ||
export const COLOR_PRIMARY = '#fff'; |
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
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
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
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
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
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ nav: Components | |
group: | ||
title: Components | ||
order: 10 | ||
title: IconAvatar | ||
--- | ||
|
||
## Default | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ nav: Components | |
group: | ||
title: Components | ||
order: 10 | ||
title: IconCombine | ||
--- | ||
|
||
## Default | ||
|
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,48 @@ | ||
import { useTheme } from 'antd-style'; | ||
import { forwardRef } from 'react'; | ||
import { Center } from 'react-layout-kit'; | ||
|
||
import { IconAvatarProps } from '@/IconAvatar'; | ||
|
||
import DefaultIcon from './DefaultIcon'; | ||
|
||
const DefaultAvatar = forwardRef<HTMLDivElement, Omit<IconAvatarProps, 'Icon'>>( | ||
( | ||
{ | ||
shape = 'circle', | ||
color, | ||
background, | ||
size, | ||
style, | ||
iconMultiple = 0.6, | ||
iconStyle, | ||
iconClassName, | ||
}, | ||
ref, | ||
) => { | ||
const theme = useTheme(); | ||
return ( | ||
<Center | ||
flex={'none'} | ||
ref={ref} | ||
style={{ | ||
background: background || theme.colorFillSecondary, | ||
borderRadius: shape === 'circle' ? '50%' : Math.floor(size * 0.1), | ||
color, | ||
height: size, | ||
width: size, | ||
...style, | ||
}} | ||
> | ||
<DefaultIcon | ||
className={iconClassName} | ||
color={color} | ||
size={size * iconMultiple} | ||
style={iconStyle} | ||
/> | ||
</Center> | ||
); | ||
}, | ||
); | ||
|
||
export default DefaultAvatar; |
Oops, something went wrong.