Files
TUIkit/docs/app/components/Icon.tsx
T
phranck 42b0597075 Feat: Comprehensive SEO improvements for landing page
- Add robots.txt and sitemap.xml (static files for export mode)
- Add OG image (1200x630) with terminal icon + branding
- Add Twitter Card meta tags (summary_large_image)
- Add canonical URL via metadataBase
- Add JSON-LD structured data (SoftwareSourceCode schema)
- Add <main> landmark and skip-navigation link for accessibility
- Add preconnect hints for Google Fonts, Google Static, and Umami
- Add web app manifest (site.webmanifest)
- Add meta keywords for secondary search engines
- Add aria-hidden on decorative SF Symbol icons
2026-02-01 04:00:02 +01:00

47 lines
1.0 KiB
TypeScript

"use client";
import {
SFSymbol,
SFAppleTerminalFill,
SFPaintbrushFill,
SFKeyboardFill,
SFSquareStack3dUpFill,
SFBoltFill,
SFDocumentFill,
SFEyeFill,
SFArrowLeftArrowRight,
SFSwift,
SFCheckmarkCircleFill,
} from "sf-symbols-lib/hierarchical";
/** Maps of icon names to SF Symbol constants for type-safe usage. */
const icons = {
terminal: SFAppleTerminalFill,
paintbrush: SFPaintbrushFill,
keyboard: SFKeyboardFill,
stack: SFSquareStack3dUpFill,
bolt: SFBoltFill,
document: SFDocumentFill,
eye: SFEyeFill,
arrows: SFArrowLeftArrowRight,
swift: SFSwift,
checkmark: SFCheckmarkCircleFill,
} as const;
export type IconName = keyof typeof icons;
interface IconProps {
name: IconName;
size?: number;
className?: string;
}
/** Decorative icon wrapper — hidden from screen readers since adjacent text conveys meaning. */
export default function Icon({ name, size = 20, className }: IconProps) {
return (
<span aria-hidden="true">
<SFSymbol name={icons[name]} size={size} className={className} />
</span>
);
}