UNPKG

vue3-icon-picker

Version:
37 lines (36 loc) 1.09 kB
import type { Ref } from 'vue'; 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 * - svgUrl: 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: Ref<Icon[]>; prepareData: () => Promise<Icon[]>; }; /** * 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; /** * Loosely validate a URL `string`. * * @param {string} string * @return {boolean} */ export declare function isURL(string: string): boolean;