import React, { Component, Ref } from 'react'; import PanningContext from './PanningContext'; function asPanViewConsumer( WrappedComponent: React.ComponentType ): React.ComponentClass { class PanViewConsumer extends Component { contentRef: any; saveRef = (r: Ref>) => { this.contentRef = r; }; render() { return ( {context => } ); } } return PanViewConsumer as any; } export default asPanViewConsumer;