UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

1 lines 959 B
define([], function() { return "import * as React from 'react';\r\nimport {\r\n Image,\r\n IImageProps,\r\n ImageFit,\r\n Label\r\n} from '../../../../index';\r\n\r\nexport class ImageContainExample extends React.Component<any, any> {\r\n public render() {\r\n let imageProps: IImageProps = {\r\n src: 'http://placehold.it/700x300',\r\n imageFit: ImageFit.contain\r\n };\r\n\r\n return (\r\n <div>\r\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>\r\n <Image { ...imageProps as any } width={ 200 } height={ 200 } />\r\n <br />\r\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>\r\n <Image { ...imageProps as any } width={ 300 } height={ 50 } />\r\n </div>\r\n );\r\n }\r\n}\r\n"; });