UNPKG

@arshiash80/strapi-plugin-iconhub

Version:

Icon picker plugin for Strapi with Iconify integration — search, select, and store icons with raw SVG for high-performance rendering.

28 lines (27 loc) 1.01 kB
import type { IconifyInfo } from '@iconify/types'; export type IconifyIconSetList = Record<string, IconifyInfo>; interface IconifyAPIResponse<T> { data?: T; success: boolean; error?: { message: string; }; } type SearchIconResponse = IconifyAPIResponse<{ /** List of icons, including prefixes */ icons: string[]; /** Number of results. If same as `limit`, more results are available */ total: number; /** Number of results shown */ limit: number; /** Index of first result */ start: number; /** Info about icon sets */ collections: Record<string, IconifyInfo>; /** Copy of request, values are string */ request: Record<keyof SearchIconResponse, string>; }>; export declare const searchIcon: (query: string, start?: number, limit?: number) => Promise<SearchIconResponse>; type GetIconResponse = IconifyAPIResponse<IconifyIconSetList>; export declare const getIconSetByPrefixes: (prefixes?: string) => Promise<GetIconResponse>; export {};