mirror of
https://github.com/infeng/react-viewer.git
synced 2025-12-08 17:36:40 +00:00
Merge pull request #85 from miho7031/master
Fix "TypeError: Super expression must either be null or a function"
This commit is contained in:
commit
f82d907e95
12
src/Icon.tsx
12
src/Icon.tsx
@ -18,12 +18,10 @@ export interface IconProps {
|
||||
type: ActionType;
|
||||
}
|
||||
|
||||
export default class Icon extends React.Component<IconProps, any> {
|
||||
render() {
|
||||
let prefixCls = 'react-viewer-icon';
|
||||
export default function Icon(props: IconProps) {
|
||||
let prefixCls = 'react-viewer-icon';
|
||||
|
||||
return (
|
||||
<i className={`${prefixCls} ${prefixCls}-${ActionType[this.props.type]}`}></i>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<i className={`${prefixCls} ${prefixCls}-${ActionType[props.type]}`}></i>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user