@fluentui/react-northstar
Version:
A themable React component library.
24 lines (23 loc) • 714 B
JavaScript
import { toFlexAlignment, toFlexItemSizeValues } from './utils';
export var flexItemStyles = {
root: function root(_ref) {
var p = _ref.props,
v = _ref.variables;
return Object.assign({}, p.align && {
alignSelf: toFlexAlignment(p.align)
}, p.size && toFlexItemSizeValues(v.hasOwnProperty(p.size) ? v[p.size] : p.size), typeof p.shrink === 'number' && {
flexShrink: p.shrink
}, p.shrink === false && {
flexShrink: 0
}, p.grow && {
flexGrow: p.grow
}, p.grow === true && {
flexGrow: 1
}, p.push && (p.flexDirection === 'column' ? {
marginTop: 'auto'
} : {
marginLeft: 'auto'
}));
}
};
//# sourceMappingURL=flexItemStyles.js.map