@fe6/icon-vue
Version:
Water Icon 的 VUE3 图标
57 lines (56 loc) • 1.92 kB
TypeScript
import type { ComponentOptions, DefineComponent } from 'vue';
export declare type StrokeLinejoin = 'miter' | 'round' | 'bevel';
export declare type StrokeLinecap = 'butt' | 'round' | 'square';
export declare type TCubeTheme = 'outline' | 'filled' | 'twoTone' | 'multiColor';
export interface ICubeBaseColors {
outStrokeColor: string;
outFillColor: string;
}
export interface ICubeMoreColors extends ICubeBaseColors {
innerStrokeColor: string;
innerFillColor: string;
}
export interface IColors {
outline: ICubeBaseColors;
filled: ICubeBaseColors;
twoTone: ICubeBaseColors;
multiColor: ICubeMoreColors;
}
export interface ISvgIconProps {
id?: string;
size?: number | string;
strokeWidth?: number;
strokeLinecap?: StrokeLinecap;
strokeLinejoin?: StrokeLinejoin;
colors: string[];
spin?: boolean;
}
export interface IIconConfig {
size: number | string;
strokeWidth: number;
strokeLinecap: StrokeLinecap;
strokeLinejoin: StrokeLinejoin;
prefix: string;
spin: boolean;
rtl: boolean;
theme: TCubeTheme;
colors: IColors;
}
export interface IIconBase {
size?: number | string;
strokeWidth?: number;
strokeLinecap?: StrokeLinecap;
strokeLinejoin?: StrokeLinejoin;
theme?: TCubeTheme;
colors?: string[];
}
export interface IIconProps extends IIconBase {
spin?: boolean;
}
export declare type IconOptions = ComponentOptions<IIconProps>;
export declare type IconRender = (props: ISvgIconProps) => JSX.Element;
export declare type Icon = DefineComponent<ISvgIconProps>;
export declare const DEFAULT_ICON_CONFIGS: IIconConfig;
export declare const IconConverter: (id: string, icon: IIconBase, config: IIconConfig) => ISvgIconProps;
export declare const IconProvider: (config: IIconConfig) => void;
export declare const IconWrapper: (name: string, rtl: boolean, render: IconRender) => DefineComponent<IconOptions>;