UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

29 lines 1.92 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { Image, ImageFit } from 'office-ui-fabric-react/lib/Image'; import { Label } from 'office-ui-fabric-react/lib/Label'; var ImageMaximizeFrameExample = /** @class */ (function (_super) { tslib_1.__extends(ImageMaximizeFrameExample, _super); function ImageMaximizeFrameExample() { return _super !== null && _super.apply(this, arguments) || this; } ImageMaximizeFrameExample.prototype.render = function () { var imageProps = { src: 'http://placehold.it/500x500', imageFit: ImageFit.cover, maximizeFrame: true }; return (React.createElement("div", null, React.createElement("p", null, "Where the exact width and height of the image's frame is not known, such as when sizing an image as a percentage of its parent, you can use the \"maximizeFrame\" prop to expand the frame to fill the parent element."), React.createElement(Label, null, "The image is placed within a landscape container."), React.createElement("div", { style: { width: '200px', height: '100px' } }, React.createElement(Image, tslib_1.__assign({}, imageProps, { alt: "Example implementation of the property maximize frame with a landscape container." }))), React.createElement("br", null), React.createElement(Label, null, "The image is placed within a portrait container."), React.createElement("div", { style: { width: '100px', height: '200px' } }, React.createElement(Image, tslib_1.__assign({}, imageProps, { alt: "Example implementation of the property maximize frame with a portrait container" }))))); }; return ImageMaximizeFrameExample; }(React.Component)); export { ImageMaximizeFrameExample }; //# sourceMappingURL=Image.MaximizeFrame.Example.js.map