UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

114 lines (112 loc) 6.14 kB
define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/DocumentCard", "office-ui-fabric-react/lib/Image", "../../../common/TestImages"], function (require, exports, tslib_1, React, DocumentCard_1, Image_1, TestImages_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var DocumentCardCompleteExample = (function (_super) { tslib_1.__extends(DocumentCardCompleteExample, _super); function DocumentCardCompleteExample() { return _super !== null && _super.apply(this, arguments) || this; } DocumentCardCompleteExample.prototype.render = function () { var previewProps = { getOverflowDocumentCountText: function (overflowCount) { return "+" + overflowCount + " more"; }, previewImages: [ { name: '2016 Conference Presentation', url: 'http://bing.com', previewImageSrc: TestImages_1.TestImages.documentPreview, iconSrc: TestImages_1.TestImages.iconPpt, imageFit: Image_1.ImageFit.cover, width: 318, height: 196 }, { name: 'New Contoso Collaboration for Conference Presentation Draft', url: 'http://bing.com', previewImageSrc: TestImages_1.TestImages.documentPreviewTwo, iconSrc: TestImages_1.TestImages.iconPpt, imageFit: Image_1.ImageFit.cover, width: 318, height: 196 }, { name: 'Spec Sheet for design', url: 'http://bing.com', previewImageSrc: TestImages_1.TestImages.documentPreviewThree, iconSrc: TestImages_1.TestImages.iconPpt, imageFit: Image_1.ImageFit.cover, width: 318, height: 196 }, { name: 'Contoso Marketing Presentation', url: 'http://bing.com', previewImageSrc: TestImages_1.TestImages.documentPreview, iconSrc: TestImages_1.TestImages.iconPpt, imageFit: Image_1.ImageFit.cover, width: 318, height: 196 }, { name: 'Notes from Ignite conference', url: 'http://bing.com', previewImageSrc: TestImages_1.TestImages.documentPreviewTwo, iconSrc: TestImages_1.TestImages.iconPpt, imageFit: Image_1.ImageFit.cover, width: 318, height: 196 }, { name: 'FY17 Cost Projections', url: 'http://bing.com', previewImageSrc: TestImages_1.TestImages.documentPreviewThree, iconSrc: TestImages_1.TestImages.iconPpt, imageFit: Image_1.ImageFit.cover, width: 318, height: 196 } ], }; return (React.createElement(DocumentCard_1.DocumentCard, { onClick: function () { console.log('You clicked the card.'); } }, React.createElement(DocumentCard_1.DocumentCardPreview, tslib_1.__assign({}, previewProps)), React.createElement(DocumentCard_1.DocumentCardLocation, { location: 'Marketing Documents', locationHref: 'http://microsoft.com', ariaLabel: 'Location, Marketing Documents' }), React.createElement(DocumentCard_1.DocumentCardTitle, { title: '6 files were uploaded' }), React.createElement(DocumentCard_1.DocumentCardActivity, { activity: 'Created Feb 23, 2016', people: [ { name: 'Annie Lindqvist', profileImageSrc: TestImages_1.TestImages.personaFemale }, { name: 'Roko Kolar', profileImageSrc: '', initials: 'JH' }, { name: 'Greta Lundberg', profileImageSrc: TestImages_1.TestImages.personaFemale } ] }), React.createElement(DocumentCard_1.DocumentCardActions, { actions: [ { iconProps: { iconName: 'Share' }, onClick: function (ev) { console.log('You clicked the share action.'); ev.preventDefault(); ev.stopPropagation(); }, ariaLabel: 'share action' }, { iconProps: { iconName: 'Pin' }, onClick: function (ev) { console.log('You clicked the pin action.'); ev.preventDefault(); ev.stopPropagation(); }, ariaLabel: 'pin action' }, { iconProps: { iconName: 'Ringer' }, onClick: function (ev) { console.log('You clicked the ringer action.'); ev.preventDefault(); ev.stopPropagation(); }, ariaLabel: 'ringer action' }, ], views: 432 }))); }; return DocumentCardCompleteExample; }(React.Component)); exports.DocumentCardCompleteExample = DocumentCardCompleteExample; }); //# sourceMappingURL=DocumentCard.Complete.Example.js.map