UNPKG

@bootstrap-styled/css-utils

Version:

Bootstrap mixins and utilities in javascript for bootstrap-styled.

45 lines (39 loc) 1.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPositionUtilities = getPositionUtilities; exports.fixedTop = fixedTop; exports.fixedBottom = fixedBottom; exports.stickTop = stickTop; exports.default = exports.defaultProps = void 0; var defaultProps = { '$zindex-fixed': '1030', '$zindex-sticky': '1030' }; exports.defaultProps = defaultProps; function getPositionUtilities() { var zindexFixed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps['$zindex-fixed']; var zindexSticky = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultProps['$zindex-sticky']; return "\n ".concat(fixedTop(zindexFixed), "\n ").concat(fixedBottom(zindexFixed), "\n ").concat(stickTop(zindexSticky), "\n "); } function fixedTop() { var zindexFixed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps['$zindex-fixed']; return "\n .fixed-top {\n position: fixed !important;\n top: 0;\n right: 0;\n left: 0;\n z-index: ".concat(zindexFixed, ";\n }\n "); } function fixedBottom() { var zindexFixed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps['$zindex-fixed']; return "\n .fixed-bottom {\n position: fixed !important;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ".concat(zindexFixed, ";\n }\n "); } function stickTop() { var zindexSticky = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps['$zindex-sticky']; return "\n .sticky-top {\n position: sticky !important;\n top: 0;\n z-index: ".concat(zindexSticky, ";\n }\n "); } var _default = { defaultProps: defaultProps, getPositionUtilities: getPositionUtilities, fixedTop: fixedTop, fixedBottom: fixedBottom, stickTop: stickTop }; exports.default = _default;