@momentum-ui/react-collaboration
Version:
Cisco Momentum UI Framework for React Collaboration Applications
52 lines • 2.58 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import React from 'react';
import { Button, Lightbox } from '@momentum-ui/react-collaboration';
import reactIcon from './momentum.jpg';
var LightboxDefault = /** @class */ (function (_super) {
__extends(LightboxDefault, _super);
function LightboxDefault() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.state = {
index: 0,
show: false,
downloading: false,
};
return _this;
}
LightboxDefault.prototype.render = function () {
var _this = this;
return (React.createElement("div", null,
React.createElement(Button, { ariaLabel: "Show Lightbox", onClick: function () { return _this.setState({ show: true }); } }, "Show"),
this.state.show && (React.createElement(Lightbox, { onClose: function () { return _this.setState({ show: false }); }, onChange: function (idx) { return _this.setState({ index: idx }); }, name: "Screen Shot 2018-04-11 at 7.32.51 PM.png", applicationId: "app", onDownload: function () {
_this.setState({ downloading: true });
setTimeout(function () { return _this.setState({ downloading: false }); }, 2000);
}, downloading: this.state.downloading, info: {
sharedBy: 'Shared by test',
sharedOn: 'At 4/17/2018, 10:02 AM',
size: '34.4 KB',
}, index: this.state.index, height: 250, width: 250, pages: [
{
decrypting: false,
image: reactIcon,
thumb: reactIcon,
},
] }))));
};
return LightboxDefault;
}(React.Component));
export default LightboxDefault;
//# sourceMappingURL=Default.js.map