UNPKG

1.29 kBTypeScriptView Raw
1import React from 'react';
2import { createFromIconfontCN, getTwoToneColor, setTwoToneColor } from '@ant-design/icons';
3export interface CustomIconComponentProps {
4 width: string | number;
5 height: string | number;
6 fill: string;
7 viewBox?: string;
8 className?: string;
9 style?: React.CSSProperties;
10 spin?: boolean;
11 rotate?: number;
12 ['aria-hidden']?: React.AriaAttributes['aria-hidden'];
13}
14export declare type ThemeType = 'filled' | 'outlined' | 'twoTone';
15interface CoreIconProps {
16 tabIndex?: number;
17 className?: string;
18 theme?: ThemeType;
19 title?: string;
20 onKeyUp?: React.KeyboardEventHandler<HTMLElement>;
21 onClick?: React.MouseEventHandler<HTMLElement>;
22 twoToneColor?: string;
23 viewBox?: string;
24 spin?: boolean;
25 rotate?: number;
26 style?: React.CSSProperties;
27 role?: string;
28}
29export interface IconProps extends CoreIconProps {
30 type?: string;
31 component?: React.ComponentType<CustomIconComponentProps | React.SVGProps<SVGSVGElement>>;
32}
33export interface IconComponent<P> extends React.SFC<P> {
34 createFromIconfontCN: typeof createFromIconfontCN;
35 getTwoToneColor: typeof getTwoToneColor;
36 setTwoToneColor: typeof setTwoToneColor;
37}
38declare const Icon: IconComponent<IconProps>;
39export default Icon;