@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
28 lines • 982 B
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
const _excluded = ["className", "direction", "alignSelf", "align", "gap", "children"];
import React from 'react';
import classnames from 'classnames';
import Container from './Container';
function Stack(props) {
const {
className,
direction = 'vertical',
alignSelf = 'stretch',
align = 'stretch',
gap = props.divider !== 'line' && props.divider !== 'line-framed' ? 'medium' : 'small',
children
} = props,
rest = _objectWithoutProperties(props, _excluded);
return React.createElement(Container, _extends({
element: "section",
className: classnames('dnb-flex-stack', className),
direction: direction,
alignSelf: alignSelf,
align: align,
gap: gap
}, rest), children);
}
Stack._supportsSpacingProps = true;
export default Stack;
//# sourceMappingURL=Stack.js.map