baseui
Version:
A React Component library implementing the Base design language
46 lines (43 loc) • 942 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StyledRoot = void 0;
var _styles = require("../styles");
/*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
const StyledRoot = exports.StyledRoot = (0, _styles.styled)('div', ({
$wrap,
$theme
}) => {
return {
display: 'flex',
columnGap: $theme.sizing.scale300,
rowGap: $theme.sizing.scale300,
...getWrapStyles({
$wrap,
$theme
})
};
});
StyledRoot.displayName = "StyledRoot";
StyledRoot.displayName = 'StyledRoot';
const getWrapStyles = ({
$wrap,
$theme
}) => {
if (typeof $wrap === 'boolean') {
return $wrap ? {
padding: 0,
flexWrap: 'wrap'
} : {
overflowX: 'auto',
scrollbarWidth: 'none',
padding: `0 ${$theme.sizing.scale600}`
};
}
return {};
};