dora-ui
Version:
A React.js Mobile UI Library
32 lines (31 loc) • 991 B
TypeScript
import PropTypes from 'prop-types';
import React, { Component } from 'react';
export interface IconProps {
type: 'success' | 'error' | 'info' | 'warning' | 'loading';
size?: 'sm' | 'md' | 'lg';
color?: string;
spinning?: boolean;
prefixCls?: string;
className?: string;
onClick?: (e: React.MouseEvent) => void;
}
declare class Icon extends Component<IconProps, {}> {
static propTypes: {
type: PropTypes.Validator<string>;
size: PropTypes.Requireable<string>;
color: PropTypes.Requireable<string>;
spinning: PropTypes.Requireable<boolean>;
prefixCls: PropTypes.Requireable<string>;
className: PropTypes.Requireable<string>;
onClick: PropTypes.Requireable<(...args: any[]) => any>;
};
static defaultProps: {
prefixCls: string;
size: string;
color: string;
onClick: () => void;
};
componentDidMount(): void;
render(): JSX.Element;
}
export default Icon;