mirror of
https://github.com/hanzoai/icons.git
synced 2026-09-24 16:59:52 +00:00
1.1 KiB
1.1 KiB
nav, group, title, apiHeader
| nav | group | title | apiHeader | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Components |
|
getLobeIconCDN |
|
Default
import { getLobeIconCDN } from '@lobehub/icons';
import { Grid } from '@lobehub/ui';
import { useThemeMode } from 'antd-style';
export default () => {
const { isDarkMode } = useThemeMode();
const color = getLobeIconCDN('Claude');
const mono = getLobeIconCDN('Claude', { type: 'mono', isDarkMode });
const text = getLobeIconCDN('Claude', { type: 'text', isDarkMode });
return (
<Grid>
<img height={48} src={color} alt="Claude" />
<img height={48} src={mono} alt="Claude" />
<img height={48} src={text} alt="Claude" />
</Grid>
);
};
Options
export interface LobeIconCdnConfig {
cdn?: 'aliyun' | 'unpkg';
format?: 'svg' | 'png' | 'webp';
isDarkMode?: boolean;
type?: 'mono' | 'color' | 'text' | 'text-cn' | 'brand' | 'brand-color';
}