UNPKG

853 BTypeScriptView Raw
1/// <reference types="react" />
2
3import * as React from 'react';
4import CommonProps from '../util';
5
6export interface IconProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
7 /**
8 * 指定显示哪种图标
9 */
10 type?: string;
11
12 /**
13 * 指定图标大小
14 */
15 size?:
16 | number
17 | 'xxs'
18 | 'xs'
19 | 'small'
20 | 'medium'
21 | 'large'
22 | 'xl'
23 | 'xxl'
24 | 'xxxl'
25 | 'inherit';
26}
27
28export interface iconOptions {
29 /**
30 * 如果页面上已经有同 id 的标签,那么不会再加载这个图标库
31 */
32 scriptUrl: string;
33}
34
35export class CustomIcon extends React.Component<IconProps, any> {}
36
37export default class Icon extends React.Component<IconProps, any> {
38 static createFromIconfontCN(options: iconOptions): typeof CustomIcon;
39}