DocSpace-client/packages/asc-web-common/utils/withLayoutSize.js

15 lines
341 B
JavaScript
Raw Normal View History

2020-11-17 03:29:24 +00:00
import * as React from "react";
import { Consumer } from "@appserver/components/utils/context";
2020-11-17 03:29:24 +00:00
export function withLayoutSize(Component) {
return function LayoutSizeComponent(props) {
return (
<Consumer>
{(context) => {
return <Component {...props} {...context} />;
2020-11-17 03:29:24 +00:00
}}
</Consumer>
);
};
}