UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

17 lines (16 loc) 1.01 kB
define(["require", "exports", 'react', '../../../../index', '../../../../utilities/array', './FocusZone.Photos.Example.scss'], function (require, exports, React, index_1, array_1) { "use strict"; var PHOTOS = array_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(index_1.FocusZone, null, React.createElement("ul", {className: 'ms-FocusZoneExamples-photoList'}, PHOTOS.map(function (photo, index) { return (React.createElement("div", {key: index, className: 'ms-FocusZoneExamples-photoCell', "data-is-focusable": true, onClick: function () { return console.log('clicked'); }}, React.createElement(index_1.Image, {src: photo.url, width: photo.width, height: photo.height}) )); })) )); }; });