@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
22 lines • 1.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OperativeLayout = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const useMediaDevice_1 = require("../../hooks/useMediaDevice/useMediaDevice");
const useStyles_1 = require("../../hooks/useStyles/useStyles");
const errorBoundary_1 = require("../../provider/errorBoundary/errorBoundary");
const fallbackComponent_1 = require("../../provider/errorBoundary/fallbackComponent");
const operativeLayoutStandAlone_1 = require("./operativeLayoutStandAlone");
const OPERATIVE_LAYOUT_STYLES = 'OPERATIVE_LAYOUT_STYLES';
const OperativeLayoutComponent = ({ variant, maxWidthParentContainer, ctv, ...props }) => {
const device = (0, useMediaDevice_1.useMediaDevice)();
const styles = (0, useStyles_1.useStyles)(OPERATIVE_LAYOUT_STYLES, variant, ctv);
const maxWidthToApply = maxWidthParentContainer || styles.maxWidthParentContainer;
return ((0, jsx_runtime_1.jsx)(operativeLayoutStandAlone_1.OperativeLayoutStandAlone, { ...props, device: device, maxWidthToApply: maxWidthToApply, styles: styles }));
};
/**
* @deprecated This component has been deprecated and will be removed in the next MAJOR release.
*/
const OperativeLayout = (props) => ((0, jsx_runtime_1.jsx)(errorBoundary_1.ErrorBoundary, { fallBackComponent: (0, jsx_runtime_1.jsx)(fallbackComponent_1.FallbackComponent, { children: (0, jsx_runtime_1.jsx)(operativeLayoutStandAlone_1.OperativeLayoutStandAlone, { ...props }) }), children: (0, jsx_runtime_1.jsx)(OperativeLayoutComponent, { ...props }) }));
exports.OperativeLayout = OperativeLayout;
//# sourceMappingURL=operativeLayout.js.map