@uifabric/experiments
Version:
Experimental React components for building experiences for Office 365.
29 lines • 1.22 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var office_ui_fabric_react_1 = require("office-ui-fabric-react");
var BaseState_1 = require("../../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 === office_ui_fabric_react_1.ImageLoadState.loaded
});
};
_this.state = {
isPictureLoaded: false,
onPhotoLoadingStateChange: _this._onPhotoLoadingStateChange
};
return _this;
}
return PersonaCoinState;
}(BaseState_1.BaseState));
exports.PersonaCoinState = PersonaCoinState;
//# sourceMappingURL=PersonaCoin.state.js.map