@logicamente.info/react-pdf-viewer
Version:
A React PDF viewer component, bootstrap compatible, with controls based on PDF.js.
31 lines (27 loc) • 1 kB
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
import RotateLeftIcon from '@material-ui/icons/RotateLeft';
var RotateLeft = function RotateLeft(_ref) {
var css = _ref.css,
rotationAngle = _ref.rotationAngle,
handleRotateLeft = _ref.handleRotateLeft;
var rotateLeftClass = css || 'btn btn-sm btn-dark border-0 mx-1';
if (rotationAngle === -90) {
return /*#__PURE__*/React.createElement("button", {
type: "button",
className: rotateLeftClass,
disabled: true
}, /*#__PURE__*/React.createElement(RotateLeftIcon, null));
}
return /*#__PURE__*/React.createElement("button", {
type: "button",
className: rotateLeftClass,
onClick: handleRotateLeft
}, /*#__PURE__*/React.createElement(RotateLeftIcon, null));
};
RotateLeft.propTypes = process.env.NODE_ENV !== "production" ? {
css: PropTypes.string,
rotationAngle: PropTypes.number.isRequired,
handleRotateLeft: PropTypes.func.isRequired
} : {};
export default RotateLeft;