UNPKG

@momentum-ui/react-collaboration

Version:

Cisco Momentum UI Framework for React Collaboration Applications

46 lines 2.43 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, ContentItem, Icon } from '@momentum-ui/react-collaboration'; var ContentItemIcon = /** @class */ (function (_super) { __extends(ContentItemIcon, _super); function ContentItemIcon() { return _super !== null && _super.apply(this, arguments) || this; } ContentItemIcon.prototype.render = function () { var handleClick = function () { alert('file onClick'); }; var folderClick = function (e) { alert('folder clicked'); e.stopPropagation(); }; var downloadClick = function (e) { alert('download clicked'); e.stopPropagation(); }; var actionNode = (React.createElement("div", null, React.createElement(Button, { ariaLabel: "Open in folder", circle: true, onClick: folderClick, style: { backgroundColor: 'black' }, size: 32 }, React.createElement(Icon, { name: "open-in-folder_14", color: "white" })), React.createElement(Button, { ariaLabel: "Download", circle: true, onClick: downloadClick, style: { backgroundColor: 'black' }, size: 32 }, React.createElement(Icon, { name: "icon-arrow-tail-down_14", color: "white" })))); return (React.createElement("div", { className: "columns large" }, React.createElement(ContentItem, { actionNode: actionNode, fileSize: "24 KB", icon: "file-pdf_72", onClick: handleClick, subtitle: "Barbara German, 12/05/18", title: "Ideas.pdf", type: "file" }))); }; return ContentItemIcon; }(React.PureComponent)); export default ContentItemIcon; //# sourceMappingURL=Icon.js.map