UNPKG

vue3-icon-picker

Version:
44 lines (43 loc) 1.23 kB
import type { Icon } from './types'; /** * Use this composable to load icons list. * * Icons list is fetched from remote URL. * The list is an array of objects with following properties: * - id: number * - name: string * - svgCodeUrl: string * - library: string * * The composable returns an object with two properties: * - iconsList: Ref<Icon[]> - the list of icons * - prepareData: () => Promise<void> - a function to refetch the list * * @returns {{ iconsList: Ref<Icon[]>, prepareData: () => Promise<Icon[]> }} */ export declare function useIconsLoader(): { iconsList: globalThis.Ref<{ id: number; name: string; svgCodeUrl: string; library: string; }[], Icon[] | { id: number; name: string; svgCodeUrl: string; library: string; }[]>; prepareData: () => Promise<{ id: number; name: string; svgCodeUrl: string; library: string; }[]>; }; /** * Checks if the given string is a valid SVG document. * * @param {string} input - The string to be checked. * @return {boolean} Returns true if the string is a valid SVG document, false otherwise. */ export declare function isSVG(input: string): boolean;