UNPKG

1.08 kBTypeScriptView Raw
1import { IconDefinition } from '@ant-design/icons/lib/types';
2import * as React from 'react';
3import { MiniMap } from '../utils';
4export interface IconProps {
5 type: string | IconDefinition;
6 className?: string;
7 onClick?: React.MouseEventHandler<SVGSVGElement>;
8 style?: React.CSSProperties;
9 primaryColor?: string;
10 secondaryColor?: string;
11 focusable?: string;
12}
13export interface TwoToneColorPaletteSetter {
14 primaryColor: string;
15 secondaryColor?: string;
16}
17export interface TwoToneColorPalette extends TwoToneColorPaletteSetter {
18 secondaryColor: string;
19}
20declare class Icon extends React.Component<IconProps> {
21 static displayName: string;
22 static definitions: MiniMap<IconDefinition>;
23 static add(...icons: IconDefinition[]): void;
24 static clear(): void;
25 static get(key?: string, colors?: TwoToneColorPalette): IconDefinition | undefined;
26 static setTwoToneColors({ primaryColor, secondaryColor }: TwoToneColorPaletteSetter): void;
27 static getTwoToneColors(): TwoToneColorPalette;
28 render(): any;
29}
30export default Icon;