We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2f6cf11 + b7411dd commit f82d907Copy full SHA for f82d907
src/Icon.tsx
@@ -18,12 +18,10 @@ export interface IconProps {
18
type: ActionType;
19
}
20
21
-export default class Icon extends React.Component<IconProps, any> {
22
- render() {
23
- let prefixCls = 'react-viewer-icon';
+export default function Icon(props: IconProps) {
+ let prefixCls = 'react-viewer-icon';
24
25
- return (
26
- <i className={`${prefixCls} ${prefixCls}-${ActionType[this.props.type]}`}></i>
27
- );
28
- }
+ return (
+ <i className={`${prefixCls} ${prefixCls}-${ActionType[props.type]}`}></i>
+ );
29
0 commit comments