UNPKG

@fe6/icon-img

Version:

Water Icon 的纯 HTML 图标

63 lines (62 loc) 2.08 kB
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; svg?: string; } 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[]; svg?: string; } export interface IIconProps extends IIconBase { spin?: boolean; base64?: boolean; id?: string; } export declare type IconOptions = IIconProps; export declare type IconRender = (props: IIconProps) => string; export declare type IconReturn = (props: IIconProps) => string; export declare const DEFAULT_ICON_CONFIGS: IIconConfig; export declare const IconConverter: (id: string, icon: IIconBase, config: IIconConfig) => ISvgIconProps; export declare const base64encode: (str: string, isUrl?: boolean) => string; export declare const unicodeToUtf8: (str: string) => string; export declare const setConfig: (config: IIconConfig) => void; export declare const getConfig: () => IIconConfig; export declare const IconWrapper: (name: string, rtl: boolean, render: IconRender) => IconReturn;