UNPKG

@studiocms/ui

Version:

The UI library for StudioCMS. Includes the layouts & components we use to build StudioCMS.

30 lines (29 loc) 1.15 kB
import type { iconCollections as _iconCollections } from 'studiocms:ui/icons'; import { AstroError } from 'astro/errors'; /** * Custom error class for handling errors related to StudioCMS UI Icons. * * @extends {AstroError} * * @property {string} name - The name of the error, set to 'StudioCMS UI Icon Error'. * @property {string} hint - A hint message suggesting to check the Icon Collection for the required icon. * @property {const} type - The type of the error, set to 'AstroUserError'. */ export declare class StudioCMS_UI_IconError extends AstroError { name: string; type: "AstroUserError"; } /** * Builds an error hint message for invalid or missing icons. * * @param data - An object containing the following properties: * @param data.iconCollections - An array of valid icon collections. * @param data.prefix - The prefix of the icon name. * @param data.iconName - The name of the icon. * @returns A string containing the error hint message. */ export declare function errorHintBuilder(data: { iconCollections: typeof _iconCollections; prefix: string | undefined; iconName: string | undefined; }): string;