mirror of
https://github.com/infeng/react-viewer.git
synced 2025-12-08 17:36:40 +00:00
28 lines
460 B
TypeScript
28 lines
460 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,
|
|
scaleX = 9,
|
|
scaleY = 10,
|
|
download = 11,
|
|
}
|
|
|
|
export interface IconProps {
|
|
type: ActionType;
|
|
}
|
|
|
|
export default function Icon(props: IconProps) {
|
|
let prefixCls = 'react-viewer-icon';
|
|
|
|
return (
|
|
<i className={`${prefixCls} ${prefixCls}-${ActionType[props.type]}`}></i>
|
|
);
|
|
}
|