mirror of
https://github.com/hanzoai/icons.git
synced 2026-09-24 16:59:52 +00:00
Fork of lobe-icons (MIT) rebranded for Hanzo. Renamed all 6 published packages (@hanzoai/icons + -static-svg/png/webp/avatar + -rn) and every import across src/ + docs, repo URLs (lobehub/lobe-icons → hanzoai/icons), and prose (LobeHub → Hanzo). Fresh Hanzo Icons README dropping the upstream marketing chrome. Preserved: the MIT LICENSE + original copyright (required by the fork), the LobeHub brand icon itself (src/LobeHub/ — content, like any other brand), and external @lobehub/* build/demo deps (ui, lint, docs-kit, assets-logo, fluent-emoji-3d) that have no @hanzoai equivalent. CHANGELOG left as historical.
39 lines
948 B
Plaintext
39 lines
948 B
Plaintext
---
|
|
title: getLobeIconCDN
|
|
description: Guide to resolving Hanzo Icons assets through the public CDN utilities.
|
|
category: Utils
|
|
---
|
|
|
|
## Default
|
|
|
|
```tsx
|
|
import { getLobeIconCDN } from '@hanzoai/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
|
|
|
|
```ts
|
|
export interface LobeIconCdnConfig {
|
|
cdn?: 'aliyun' | 'unpkg';
|
|
format?: 'svg' | 'png' | 'webp';
|
|
isDarkMode?: boolean;
|
|
type?: 'mono' | 'color' | 'text' | 'text-cn' | 'brand' | 'brand-color';
|
|
}
|
|
```
|