| 1 |
import { __rest } from "tslib"; |
| 2 |
import { jsx as _jsx } from "react/jsx-runtime"; |
| 3 |
import { css } from '@patternfly/react-styles'; |
| 4 |
import styles from '@patternfly/react-styles/css/layouts/Flex/flex.mjs'; |
| 5 |
import * as flexToken from '@patternfly/react-tokens/dist/esm/l_flex_item_Order'; |
| 6 |
import { formatBreakpointMods, setBreakpointCssVars } from '../../helpers/util'; |
| 7 |
export const FlexItem = (_a) => { |
| 8 |
var { children = null, className = '', component = 'div', spacer, grow, shrink, flex, alignSelf, align, fullWidth, order, style } = _a, props = __rest(_a, ["children", "className", "component", "spacer", "grow", "shrink", "flex", "alignSelf", "align", "fullWidth", "order", "style"]); |
| 9 |
const Component = component; |
| 10 |
return (_jsx(Component, Object.assign({}, props, { className: css(formatBreakpointMods(spacer, styles), formatBreakpointMods(grow, styles), formatBreakpointMods(shrink, styles), formatBreakpointMods(flex, styles), formatBreakpointMods(alignSelf, styles), formatBreakpointMods(align, styles), formatBreakpointMods(fullWidth, styles), className), style: style || order ? Object.assign(Object.assign({}, style), setBreakpointCssVars(order, flexToken.l_flex_item_Order.name)) : undefined, children: children }))); |
| 11 |
}; |
| 12 |
FlexItem.displayName = 'FlexItem'; |
| 13 |
//# sourceMappingURL=FlexItem.js.map |