UNPKG

@atlaskit/navigation-system

Version:

The latest navigation system for Atlassian apps.

22 lines (21 loc) • 1.07 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.HoistCssVarToLocalGrid = void 0; var _react = _interopRequireDefault(require("react")); var _root = require("./root"); /** * This is not ideal and shouldn't be used by anything outside of `<Banner>` and `<TopNav>`. * * This makes the other page layout elements aware that the banner and top bar have been mounted, provides them * with their heights. This is needed to power the stick points of page layout elements like SideNav and Panel. * * We should clean this up once we have a better solution, such as moving the size props for banner and top bar into `Root`. */ var HoistCssVarToLocalGrid = exports.HoistCssVarToLocalGrid = function HoistCssVarToLocalGrid(_ref) { var variableName = _ref.variableName, value = _ref.value; return /*#__PURE__*/_react.default.createElement("style", null, "#".concat(_root.gridRootId, " { ").concat(variableName, ": ").concat(value, "px }")); };