DocSpace-client/packages/asc-web-common/utils/withLayoutSize.js
2021-02-25 11:04:22 +03:00

15 lines
341 B
JavaScript

import * as React from "react";
import { Consumer } from "@appserver/components/utils/context";
export function withLayoutSize(Component) {
return function LayoutSizeComponent(props) {
return (
<Consumer>
{(context) => {
return <Component {...props} {...context} />;
}}
</Consumer>
);
};
}