@aimake/nanod
Version:
## 设计模式 NANO DESIGN 是面向于企业级中台化应用的解决方案。服务于 ToB 和 ToE 类型的单页应用,应用于各产品中从而产出了一套设计及前端规范。
39 lines (38 loc) • 1.43 kB
TypeScript
import * as React from 'react';
import createFromIconfontCN from './IconFont';
import { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';
export interface CustomIconComponentProps {
width: string | number;
height: string | number;
fill: string;
viewBox?: string;
className?: string;
style?: React.CSSProperties;
['aria-hidden']?: string;
}
export declare type ThemeType = 'filled' | 'outlined' | 'twoTone';
export interface IconProps {
type?: string;
className?: string;
theme?: ThemeType;
title?: string;
onClick?: React.MouseEventHandler<HTMLElement>;
component?: React.ComponentType<CustomIconComponentProps>;
twoToneColor?: string;
viewBox?: string;
spin?: boolean;
style?: React.CSSProperties;
prefixCls?: string;
role?: string;
}
export interface IconComponent<P> extends React.SFC<P> {
createFromIconfontCN: typeof createFromIconfontCN;
getTwoToneColor: typeof getTwoToneColor;
setTwoToneColor: typeof setTwoToneColor;
unstable_ChangeThemeOfIconsDangerously?: typeof unstable_ChangeThemeOfIconsDangerously;
unstable_ChangeDefaultThemeOfIcons?: typeof unstable_ChangeDefaultThemeOfIcons;
}
declare const Icon: IconComponent<IconProps>;
declare function unstable_ChangeThemeOfIconsDangerously(theme?: ThemeType): void;
declare function unstable_ChangeDefaultThemeOfIcons(theme: ThemeType): void;
export default Icon;