Files
zeekayandHanzo Dev 7d82a2c72a The docs are native: gui primitives, design tokens, and the real mark
@hanzo/docs 17 replaces the Tailwind/Base-UI stack. The home page now
says what Zoo is — mission, DSO and PoAI with their papers, ecosystem,
community — in gui primitives under a real nav, instead of a template's
demo cards. Static search gains its index; the logo is the three-circle
mark; linked headings paint at their own size.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-16 23:31:50 -07:00

33 lines
1.2 KiB
TypeScript

'use client';
/**
* Where this site gets its icons.
*
* `@hanzogui/*` ship no client directives, so any module the server evaluates —
* a layout, an MDX page, the source loader — pulls gui in with it, and gui
* builds its contexts at import time against a React that has no `createContext`
* on the server. One boundary, declared here, keeps every icon on the client
* side of it, and every file in the app imports from this one place.
*/
import * as icons from '@hanzogui/lucide-icons-2';
import type { ComponentProps, ComponentType } from 'react';
export { Brain, Github, Network, Vote } from '@hanzogui/lucide-icons-2';
export type IconProps = ComponentProps<typeof icons.Network>;
/** An icon content names rather than imports: frontmatter `icon:` and meta.json. */
export function Icon({ name, ...props }: IconProps & { name: string }) {
const set = icons as unknown as Record<string, ComponentType<IconProps> | undefined>;
// lucide-react published every icon twice, plain and `…Icon`; this set
// publishes it once, so a name written against the alias still lands.
const Found = set[name] ?? set[name.replace(/Icon$/, '')];
if (!Found) {
console.warn(`unknown icon: ${name}`);
return null;
}
return <Found {...props} />;
}