office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
1 lines • 1.51 kB
JavaScript
define([], function() { return "import * as React from 'react';\r\nimport {\r\n Image,\r\n Label\r\n} from '../../../../index';\r\n\r\nexport class ImageDefaultExample extends React.Component<any, any> {\r\n public render() {\r\n return (\r\n <div>\r\n <p>With no imageFit property set, the width and height props control the size of the frame. Depending on which of those props is used, the image may scale to fit the frame.</p>\r\n <Label>Without a width or height specified, the frame remains at its natural size and the image will not be scaled.</Label>\r\n <Image src='http://placehold.it/350x150' />\r\n <br />\r\n <Label>If only a width is provided, the frame will be set to that width. The image will scale proportionally to fill the available width.</Label>\r\n <Image src='http://placehold.it/350x150' width={ 600 } />\r\n <br />\r\n <Label>If only a height is provided, the frame will be set to that height. The image will scale proportionally to fill the available height.</Label>\r\n <Image src='http://placehold.it/350x150' height={ 100 } />\r\n <br />\r\n <Label>If both width and height are provided, the frame will be set to that width and height. The image will scale to fill both the available width and height. <strong>This may result in a distorted image.</strong></Label>\r\n <Image src='http://placehold.it/350x150' width={ 100 } height={ 100 } />\r\n </div>\r\n );\r\n }\r\n}\r\n"; });