UNPKG

@momentum-ui/react-collaboration

Version:

Cisco Momentum UI Framework for React Collaboration Applications

58 lines 2.82 kB
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'; import ciscoWebex from './cisco-webex-lockup-blue.png'; var LightBoxMultiple = /** @class */ (function (_super) { __extends(LightBoxMultiple, _super); function LightBoxMultiple() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.state = { index: 0, show: false, downloading: false, }; return _this; } LightBoxMultiple.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, }, { decrypting: false, image: ciscoWebex, thumb: ciscoWebex, }, ] })))); }; return LightBoxMultiple; }(React.Component)); export default LightBoxMultiple; //# sourceMappingURL=Multiple.js.map