office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
1 lines • 1.88 kB
JavaScript
define([], function() { return "import * as React from 'react';\r\n\r\nexport interface IImageProps extends React.HTMLProps<HTMLImageElement> {\r\n /**\r\n * If true, adds the css class 'is-fadeIn' to the image.\r\n */\r\n shouldFadeIn?: boolean;\r\n\r\n /**\r\n * If provided, adds the indicated css class to the image.\r\n */\r\n className?: string;\r\n\r\n /**\r\n * Used to determine how the image is scaled and cropped to fit the frame.\r\n *\r\n * @default If both dimensions are provided, then the image is fit using ImageFit.scale. Otherwise, the image won't be scaled or cropped.\r\n */\r\n imageFit?: ImageFit;\r\n\r\n /**\r\n * Image source to display if an error occurs loading the image indicated by src.\r\n */\r\n errorSrc?: string;\r\n}\r\n\r\n/**\r\n * The possible methods that can be used to fit the image.\r\n */\r\nexport enum ImageFit {\r\n /**\r\n * The image is not scaled. The image is centered and cropped within the content box.\r\n */\r\n center,\r\n\r\n /**\r\n * The image is scaled to maintain its aspect ratio while being fully contained within the frame. The image will\r\n * be centered horizontally and vertically within the frame. The space in the top and bottom or in the sides of\r\n * the frame will be empty depending on the difference in aspect ratio between the image and the frame.\r\n */\r\n contain,\r\n\r\n /**\r\n * The image is scaled to maintain its aspect ratio while filling the frame. Portions of the image will be cropped from\r\n * the top and bottom, or from the sides, depending on the difference in aspect ratio between the image and the frame.\r\n */\r\n cover,\r\n\r\n /**\r\n * Neither the image nor the frame are scaled. If their sizes do not match, the image will either be cropped or the\r\n * frame will have empty space.\r\n */\r\n none\r\n}\r\n"; });