mirror of
https://github.com/infeng/react-viewer.git
synced 2025-12-08 17:36:40 +00:00
27 lines
463 B
TypeScript
27 lines
463 B
TypeScript
import * as React from 'react';
|
|
|
|
export enum ActionType {
|
|
zoomIn = 1,
|
|
zoomOut = 2,
|
|
prev = 3,
|
|
next = 4,
|
|
rotateLeft = 5,
|
|
rotateRight = 6,
|
|
reset = 7,
|
|
close = 8,
|
|
}
|
|
|
|
export interface IconProps {
|
|
type: ActionType;
|
|
}
|
|
|
|
export default class Icon extends React.Component<IconProps, any> {
|
|
render() {
|
|
let prefixCls = 'react-viewer-icon';
|
|
|
|
return (
|
|
<i className={`${prefixCls} ${prefixCls}-${ActionType[this.props.type]}`}></i>
|
|
);
|
|
}
|
|
}
|