@fluentui/react-northstar
Version:
A themable React component library.
38 lines (36 loc) • 1.13 kB
JavaScript
"use strict";
exports.__esModule = true;
exports.avatarLabelStyles = void 0;
var _utils = require("../../../../utils");
var _avatarSizes = require("./avatarSizes");
var avatarLabelStyles = {
root: function root(_ref) {
var _ref$props = _ref.props,
circular = _ref$props.circular,
size = _ref$props.size,
square = _ref$props.square,
v = _ref.variables;
var sizeInRem = (0, _utils.pxToRem)(_avatarSizes.sizeToPxValue[size]);
return Object.assign({
alignItems: 'center',
overflow: 'hidden',
color: v.labelColor,
backgroundColor: v.labelBackground,
borderRadius: '50%',
display: 'inline-block',
width: sizeInRem,
height: sizeInRem,
lineHeight: sizeInRem,
fontSize: (0, _utils.pxToRem)(_avatarSizes.sizeToPxValue[size] / 2.333),
verticalAlign: 'top',
textAlign: 'center',
padding: '0'
}, square && {
borderRadius: v.squareAvatarBorderRadius
}, circular && {
borderRadius: v.labelCircularRadius
});
}
};
exports.avatarLabelStyles = avatarLabelStyles;
//# sourceMappingURL=avatarLabelStyles.js.map