@fluentui/react-northstar
Version:
A themable React component library.
30 lines (29 loc) • 829 B
JavaScript
import { getSizeStyles, iconSizeToPxValue, sizeToPxValue } from './avatarSizes';
export var avatarIconStyles = {
root: function root(_ref) {
var _ref$props = _ref.props,
size = _ref$props.size,
square = _ref$props.square,
v = _ref.variables;
return Object.assign({
color: v.iconColor,
background: v.iconBackgroundColor
}, getSizeStyles(sizeToPxValue[size]), {
borderRadius: '50%',
display: 'inline-flex',
alignItems: 'center'
}, square && {
borderRadius: v.squareAvatarBorderRadius
}, {
'& > :first-child': Object.assign({
margin: '0 auto'
}, getSizeStyles(iconSizeToPxValue[size]), {
'& svg': {
width: '100%',
height: '100%'
}
})
});
}
};
//# sourceMappingURL=avatarIconStyles.js.map