UNPKG

@logicamente.info/react-pdf-viewer

Version:

A React PDF viewer component, bootstrap compatible, with controls based on PDF.js.

31 lines (27 loc) 1.01 kB
import React from 'react'; import PropTypes from 'prop-types'; import RotateRightIcon from '@material-ui/icons/RotateRight'; var RotateRight = function RotateRight(_ref) { var css = _ref.css, rotationAngle = _ref.rotationAngle, handleRotateRight = _ref.handleRotateRight; var rotateRightClass = css || 'btn btn-sm btn-dark border-0 mx-1'; if (rotationAngle === 90) { return /*#__PURE__*/React.createElement("button", { type: "button", className: rotateRightClass, disabled: true }, /*#__PURE__*/React.createElement(RotateRightIcon, null)); } return /*#__PURE__*/React.createElement("button", { type: "button", className: rotateRightClass, onClick: handleRotateRight }, /*#__PURE__*/React.createElement(RotateRightIcon, null)); }; RotateRight.propTypes = process.env.NODE_ENV !== "production" ? { css: PropTypes.string, rotationAngle: PropTypes.number.isRequired, handleRotateRight: PropTypes.func.isRequired } : {}; export default RotateRight;