UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Office 365.

23 lines 1.25 kB
import * as React from 'react'; import { Image, ImageFit } from 'office-ui-fabric-react'; import { createComponent } from '../../../Foundation'; import { DEFAULT_PERSONA_COIN_SIZE } from '../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 ? 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(Image, { imageFit: ImageFit.cover, src: src, width: dimension, height: dimension, alt: imageAlt, shouldFadeIn: imageShouldFadeIn, shouldStartVisible: imageShouldStartVisible, onLoadingStateChange: onPhotoLoadingStateChange, className: props.className })); }; export var PersonaCoinImage = createComponent({ displayName: 'PersonaCoinImage', view: PersonaCoinImageView, styles: personaCoinImageStyles }); //# sourceMappingURL=PersonaCoinImage.js.map