import React, { forwardRef } from 'react'; import { OuterWrapper, Wrapper } from './styled'; type Props = { children: React.ReactNode; viewport: ViewportType; rotation: number; }; type Ref = HTMLDivElement; const Viewer = forwardRef( ({ children, viewport, rotation }: Props, ref) => { const width = (Math.abs(rotation) / 90) % 2 === 1 ? viewport.height : viewport.width; return ( {children} ); }, ); export default Viewer;