maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
34 lines (33 loc) • 1.82 kB
TypeScript
import { IconComponent } from '@maz-ui/icons';
declare const predefinedSizes: readonly ["xs", "sm", "md", "lg", "xl"];
type SizeUnit = `${number}px` | `${number}em` | `${number}rem` | `${number}%` | `${number}vw` | `${number}vh` | `${number}cm` | `${number}mm` | `${number}in` | `${number}pt` | `${number}pc` | `${number}ex`;
type PredefinedSize = typeof predefinedSizes[number];
type MazIconSize = SizeUnit | PredefinedSize;
export interface MazIconProps {
/** The icon component to render - e.g: `import { MazStar } from '@maz-ui/icons'` */
icon?: IconComponent;
/** The source path of the SVG file - e.g: `/icons/home.svg` */
src?: string;
/** The path of the folder where the SVG files are stored - e.g: `/icons` */
path?: string;
/** The name of the SVG file - e.g: `home` */
name?: string;
/** The size of the SVG file - e.g: `1em` or can be a predefined size: `'xs' | 'sm' | 'md' | 'lg' | 'xl'` */
size?: MazIconSize;
/** The title of the SVG file - e.g: `Home` */
title?: string;
/** The function to transform the source of the SVG file - e.g: `(svg) => svg` */
transformSource?: (svg: SVGElement) => SVGElement;
}
declare const _default: import('vue').DefineComponent<MazIconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
error: (error: Error) => any;
loaded: (svg: SVGElement | undefined) => any;
unloaded: () => any;
}, string, import('vue').PublicProps, Readonly<MazIconProps> & Readonly<{
onError?: ((error: Error) => any) | undefined;
onLoaded?: ((svg: SVGElement | undefined) => any) | undefined;
onUnloaded?: (() => any) | undefined;
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
svgElem: SVGSVGElement;
}, any>;
export default _default;