UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

28 lines 1.46 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { BaseComponent, css } from '../../Utilities'; import { Icon } from '../../Icon'; import { IconButton } from '../../Button'; import * as stylesImport from './DocumentCard.scss'; var styles = stylesImport; var DocumentCardActions = /** @class */ (function (_super) { tslib_1.__extends(DocumentCardActions, _super); function DocumentCardActions() { return _super !== null && _super.apply(this, arguments) || this; } DocumentCardActions.prototype.render = function () { var _a = this.props, actions = _a.actions, views = _a.views; return (React.createElement("div", { className: css('ms-DocumentCardActions', styles.actions) }, actions && actions.map(function (action, index) { return (React.createElement("div", { className: css('ms-DocumentCardActions-action', styles.action), key: index }, React.createElement(IconButton, tslib_1.__assign({}, action)))); }), views > 0 && (React.createElement("div", { className: css('ms-DocumentCardActions-views', styles.views) }, React.createElement(Icon, { iconName: "View", className: styles.viewsIcon }), views)))); }; return DocumentCardActions; }(BaseComponent)); export { DocumentCardActions }; //# sourceMappingURL=DocumentCardActions.js.map