@uifabric/experiments
Version:
Experimental React components for building experiences for Microsoft 365.
22 lines • 1.47 kB
JavaScript
define(["require", "exports", "react", "office-ui-fabric-react", "../../../Foundation", "../PersonaCoin.styles"], function (require, exports, React, office_ui_fabric_react_1, Foundation_1, PersonaCoin_styles_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var personaCoinImageStyles = {
root: {
overflow: 'hidden',
borderRadius: '50%',
},
};
var PersonaCoinImageView = function (props) {
if (!props.src) {
return null;
}
var _a = props.dimension, dimension = _a === void 0 ? PersonaCoin_styles_1.DEFAULT_PERSONA_COIN_SIZE : _a, src = props.src, _b = props.imageAlt, imageAlt = _b === void 0 ? '' : _b, onPhotoLoadingStateChange = props.onPhotoLoadingStateChange, imageShouldFadeIn = props.imageShouldFadeIn, imageShouldStartVisible = props.imageShouldStartVisible;
return (React.createElement(office_ui_fabric_react_1.Image, { imageFit: office_ui_fabric_react_1.ImageFit.cover, src: src, width: dimension, height: dimension, alt: imageAlt, shouldFadeIn: imageShouldFadeIn, shouldStartVisible: imageShouldStartVisible, onLoadingStateChange: onPhotoLoadingStateChange, className: props.className }));
};
exports.PersonaCoinImage = Foundation_1.createComponent(PersonaCoinImageView, {
displayName: 'PersonaCoinImage',
styles: personaCoinImageStyles,
});
});
//# sourceMappingURL=PersonaCoinImage.js.map