office-ui-fabric-react
Version: 
Reusable React components for building experiences for Office 365.
1 lines • 907 B
JavaScript
define([], function() { return "import * as React from 'react';\nimport {\n  Image,\n  IImageProps,\n  ImageFit,\n  Label\n} from '../../../../index';\n\nexport class ImageContainExample extends React.Component<any, any> {\n  public render() {\n    let imageProps: IImageProps = {\n      src: 'http://placehold.it/700x300',\n      imageFit: ImageFit.contain\n    };\n\n    return (\n      <div>\n        <Label>The image has a wider aspect ratio (landscape) than the frame, so the image is scaled to fit the width and the top and bottom are empty.</Label>\n        <Image { ...imageProps as any } width={ 200 } height={ 200 } />\n        <br />\n        <Label>The image has a taller aspect ratio (portrait) than the frame, so the image is scaled to fit the height and the sides are empty.</Label>\n        <Image { ...imageProps as any } width={ 300 } height={ 50 } />\n      </div>\n    );\n  }\n}\n"; });