@icon-park/svg
Version:
Pure Svg Icons for IconPark
57 lines (56 loc) • 1.82 kB
TypeScript
export declare type StrokeLinejoin = 'miter' | 'round' | 'bevel';
export declare type StrokeLinecap = 'butt' | 'round' | 'square';
export declare type Theme = 'outline' | 'filled' | 'two-tone' | 'multi-color';
export interface ISvgIconProps {
id: string;
size: number | string;
strokeWidth: number;
strokeLinecap: StrokeLinecap;
strokeLinejoin: StrokeLinejoin;
colors: string[];
}
export interface IIconConfig {
size: number | string;
strokeWidth: number;
strokeLinecap: StrokeLinecap;
strokeLinejoin: StrokeLinejoin;
prefix: string;
theme: Theme;
colors: {
outline: {
fill: string;
background: string;
};
filled: {
fill: string;
background: string;
};
twoTone: {
fill: string;
twoTone: string;
};
multiColor: {
outStrokeColor: string;
outFillColor: string;
innerStrokeColor: string;
innerFillColor: string;
};
};
}
export interface IIconBase {
size?: number | string;
strokeWidth?: number;
strokeLinecap?: StrokeLinecap;
strokeLinejoin?: StrokeLinejoin;
theme?: Theme;
fill?: string | string[];
}
export declare type IIcon = IIconBase;
export declare type IIconProps = IIconBase;
export declare type IconRender = (props: ISvgIconProps) => string;
export declare type Icon = (props: IIconProps) => string;
export declare const DEFAULT_ICON_CONFIGS: IIconConfig;
export declare function IconConverter(id: string, icon: IIconBase, config: IIconConfig): ISvgIconProps;
export declare function setConfig(config: IIconConfig): void;
export declare function getConfig(): IIconConfig;
export declare function IconWrapper(name: string, render: IconRender): Icon;