/** * Copyright (c) 2017-present Jared Palmer * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import * as React from 'react'; import { WindowSize, WindowSizeProps } from './WindowSize'; import { hoistNonReactStatics } from '../hoistStatics'; export function withWindowSize( Component: React.ComponentType ) { const S: React.SFC = props => { return ( } /> ); }; return hoistNonReactStatics( S as any, Component as React.ComponentClass ) as React.ComponentType; }