office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
34 lines • 1.89 kB
JavaScript
import * as tslib_1 from "tslib";
import * as React from 'react';
import { DocumentCard, DocumentCardActivity, DocumentCardPreview, DocumentCardTitle } from 'office-ui-fabric-react/lib/DocumentCard';
import { ImageFit } from 'office-ui-fabric-react/lib/Image';
import { TestImages } from '../../../common/TestImages';
import './DocumentCard.Example.scss';
var DocumentCardBasicExample = /** @class */ (function (_super) {
tslib_1.__extends(DocumentCardBasicExample, _super);
function DocumentCardBasicExample() {
return _super !== null && _super.apply(this, arguments) || this;
}
DocumentCardBasicExample.prototype.render = function () {
var previewProps = {
previewImages: [
{
name: 'Revenue stream proposal fiscal year 2016 version02.pptx',
url: 'http://bing.com',
previewImageSrc: TestImages.documentPreview,
iconSrc: TestImages.iconPpt,
imageFit: ImageFit.cover,
width: 318,
height: 196
}
]
};
return (React.createElement(DocumentCard, { onClickHref: "http://bing.com" },
React.createElement(DocumentCardPreview, tslib_1.__assign({}, previewProps)),
React.createElement(DocumentCardTitle, { title: "Large_file_name_with_underscores_used_to_separate_all_of_the_words_and_there_are_so_many_words_it_needs_truncating.pptx", shouldTruncate: true }),
React.createElement(DocumentCardActivity, { activity: "Created a few minutes ago", people: [{ name: 'Annie Lindqvist', profileImageSrc: TestImages.personaFemale }] })));
};
return DocumentCardBasicExample;
}(React.Component));
export { DocumentCardBasicExample };
//# sourceMappingURL=DocumentCard.Basic.Example.js.map