UNPKG

react-sizes

Version:

Hoc to easily map window sizes to props.

13 lines (9 loc) 300 B
import withSizes from './withSizes' const Conductor = ({ children, render, ...props }) => { const fn = children || render return fn ? fn(props) : null } const createSizedComponent = (...mapSizesToProps) => { return withSizes(mapSizesToProps)(Conductor) } export default createSizedComponent