| 1 |
"use strict"; |
| 2 |
Object.defineProperty(exports, "__esModule", { value: true }); |
| 3 |
exports.FlexItem = void 0; |
| 4 |
const tslib_1 = require("tslib"); |
| 5 |
const jsx_runtime_1 = require("react/jsx-runtime"); |
| 6 |
const react_styles_1 = require("@patternfly/react-styles"); |
| 7 |
const flex_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/layouts/Flex/flex")); |
| 8 |
const flexToken = tslib_1.__importStar(require('@patternfly/react-tokens/dist/js/l_flex_item_Order')); |
| 9 |
const util_1 = require("../../helpers/util"); |
| 10 |
const FlexItem = (_a) => { |
| 11 |
var { children = null, className = '', component = 'div', spacer, grow, shrink, flex, alignSelf, align, fullWidth, order, style } = _a, props = tslib_1.__rest(_a, ["children", "className", "component", "spacer", "grow", "shrink", "flex", "alignSelf", "align", "fullWidth", "order", "style"]); |
| 12 |
const Component = component; |
| 13 |
return ((0, jsx_runtime_1.jsx)(Component, Object.assign({}, props, { className: (0, react_styles_1.css)((0, util_1.formatBreakpointMods)(spacer, flex_1.default), (0, util_1.formatBreakpointMods)(grow, flex_1.default), (0, util_1.formatBreakpointMods)(shrink, flex_1.default), (0, util_1.formatBreakpointMods)(flex, flex_1.default), (0, util_1.formatBreakpointMods)(alignSelf, flex_1.default), (0, util_1.formatBreakpointMods)(align, flex_1.default), (0, util_1.formatBreakpointMods)(fullWidth, flex_1.default), className), style: style || order ? Object.assign(Object.assign({}, style), (0, util_1.setBreakpointCssVars)(order, flexToken.l_flex_item_Order.name)) : undefined, children: children }))); |
| 14 |
}; |
| 15 |
exports.FlexItem = FlexItem; |
| 16 |
exports.FlexItem.displayName = 'FlexItem'; |
| 17 |
//# sourceMappingURL=FlexItem.js.map |