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