15 lines
341 B
JavaScript
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>
|
|
);
|
|
};
|
|
}
|