UNPKG

1.32 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 children?: React.ReactNode;
33}
34export interface IconComponent<P> extends React.FC<P> {
35 createFromIconfontCN: typeof createFromIconfontCN;
36 getTwoToneColor: typeof getTwoToneColor;
37 setTwoToneColor: typeof setTwoToneColor;
38}
39declare const Icon: IconComponent<IconProps>;
40export default Icon;