UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Microsoft 365.

24 lines 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var office_ui_fabric_react_1 = require("office-ui-fabric-react"); var Foundation_1 = require("../../../Foundation"); var PersonaCoin_styles_1 = require("../PersonaCoin.styles"); 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