@astrojs/starlight
Version:
Build beautiful, high-performance documentation websites with Astro
8 lines (5 loc) • 302 B
text/typescript
import { z } from 'astro/zod';
import { Icons, type StarlightIcon } from '../components/Icons';
const iconNames = Object.keys(Icons) as [StarlightIcon, ...StarlightIcon[]];
/** String that matches the name of one of Starlight’s built-in icons. */
export const IconSchema = () => z.enum(iconNames);