UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

20 lines 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* tslint:disable:no-unused-variable */ var React = require("react"); /* tslint:enable:no-unused-variable */ var Utilities_1 = require("office-ui-fabric-react/lib/Utilities"); var FocusZone_1 = require("office-ui-fabric-react/lib/FocusZone"); var Image_1 = require("office-ui-fabric-react/lib/Image"); require("./FocusZone.Photos.Example.scss"); var PHOTOS = Utilities_1.createArray(25, function () { var randomWidth = 50 + Math.floor(Math.random() * 150); return { url: "http://placehold.it/" + randomWidth + "x100", width: randomWidth, height: 100 }; }); exports.FocusZonePhotosExample = function () { return (React.createElement(FocusZone_1.FocusZone, { elementType: 'ul', className: 'ms-FocusZoneExamples-photoList' }, PHOTOS.map(function (photo, index) { return (React.createElement("li", { key: index, className: 'ms-FocusZoneExamples-photoCell', "aria-posinset": index + 1, "aria-setsize": PHOTOS.length, "aria-label": 'Photo', "data-is-focusable": true, onClick: function () { return console.log('clicked'); } }, React.createElement(Image_1.Image, { src: photo.url, width: photo.width, height: photo.height }))); }))); }; //# sourceMappingURL=FocusZone.Photos.Example.js.map