@fluentui/react-northstar
Version:
A themable React component library.
39 lines (38 loc) • 1.1 kB
JavaScript
import { toFlexAlignment } from './utils';
export var flexStyles = {
root: function root(_ref) {
var _notLastChild;
var p = _ref.props,
v = _ref.variables;
return Object.assign({
display: 'flex'
}, p.debug && {
border: '1px dotted grey',
background: 'lightgrey'
}, p.inline && {
display: 'inline-flex'
}, p.column && {
flexDirection: 'column'
}, p.hAlign && (p.column ? {
alignItems: toFlexAlignment(p.hAlign)
} : {
justifyContent: toFlexAlignment(p.hAlign)
}), p.vAlign && (p.column ? {
justifyContent: toFlexAlignment(p.vAlign)
} : {
alignItems: toFlexAlignment(p.vAlign)
}), p.space && {
justifyContent: "space-" + p.space
}, p.wrap && {
flexWrap: 'wrap'
}, p.fill && {
width: '100%',
height: '100%'
}, p.padding && {
padding: v[p.padding]
}, p.gap && {
'> *:not(:last-child)': (_notLastChild = {}, _notLastChild[p.column ? 'marginBottom' : 'marginRight'] = v[p.gap], _notLastChild)
});
}
};
//# sourceMappingURL=flexStyles.js.map