@uifabric/experiments
Version:
Experimental React components for building experiences for Office 365.
27 lines • 1.07 kB
JavaScript
import * as tslib_1 from "tslib";
import { ImageLoadState } from 'office-ui-fabric-react';
import { BaseState } from '../../utilities/BaseState';
var PersonaCoinState = /** @class */ (function (_super) {
tslib_1.__extends(PersonaCoinState, _super);
function PersonaCoinState(props) {
var _this = _super.call(this, props, {
controlledProps: ['isPictureLoaded']
}) || this;
_this._onPhotoLoadingStateChange = function (newImageLoadState) {
if (_this.props.onPhotoLoadingStateChange) {
_this.props.onPhotoLoadingStateChange(newImageLoadState);
}
_this.setState({
isPictureLoaded: newImageLoadState === ImageLoadState.loaded
});
};
_this.state = {
isPictureLoaded: false,
onPhotoLoadingStateChange: _this._onPhotoLoadingStateChange
};
return _this;
}
return PersonaCoinState;
}(BaseState));
export { PersonaCoinState };
//# sourceMappingURL=PersonaCoin.state.js.map