2020-11-17 03:29:24 +00:00
|
|
|
import * as React from "react";
|
2021-02-24 17:11:23 +00:00
|
|
|
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) => {
|
2020-11-17 07:32:02 +00:00
|
|
|
return <Component {...props} {...context} />;
|
2020-11-17 03:29:24 +00:00
|
|
|
}}
|
|
|
|
</Consumer>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
}
|