UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

62 lines 2.63 kB
/** * The possible methods that can be used to fit the image. */ export var ImageFit; (function (ImageFit) { /** * The image is not scaled. The image is centered and cropped within the content box. */ ImageFit[ImageFit["center"] = 0] = "center"; /** * The image is scaled to maintain its aspect ratio while being fully contained within the frame. The image will * be centered horizontally and vertically within the frame. The space in the top and bottom or in the sides of * the frame will be empty depending on the difference in aspect ratio between the image and the frame. */ ImageFit[ImageFit["contain"] = 1] = "contain"; /** * The image is scaled to maintain its aspect ratio while filling the frame. Portions of the image will be cropped from * the top and bottom, or from the sides, depending on the difference in aspect ratio between the image and the frame. */ ImageFit[ImageFit["cover"] = 2] = "cover"; /** * Neither the image nor the frame are scaled. If their sizes do not match, the image will either be cropped or the * frame will have empty space. */ ImageFit[ImageFit["none"] = 3] = "none"; })(ImageFit || (ImageFit = {})); /** * The cover style to be used on the image */ export var ImageCoverStyle; (function (ImageCoverStyle) { /** * The image will be shown at 100% height of container and the width will be scaled accordingly */ ImageCoverStyle[ImageCoverStyle["landscape"] = 0] = "landscape"; /** * The image will be shown at 100% width of container and the height will be scaled accordingly */ ImageCoverStyle[ImageCoverStyle["portrait"] = 1] = "portrait"; })(ImageCoverStyle || (ImageCoverStyle = {})); export var ImageLoadState; (function (ImageLoadState) { /** * The image has not yet been loaded, and there is no error yet. */ ImageLoadState[ImageLoadState["notLoaded"] = 0] = "notLoaded"; /** * The image has been loaded successfully. */ ImageLoadState[ImageLoadState["loaded"] = 1] = "loaded"; /** * An error has been encountered while loading the image. */ ImageLoadState[ImageLoadState["error"] = 2] = "error"; /** * Deprecated at v1.3.6, to replace the src in case of errors, use onLoadingStateChange instead * and rerender the Image with a difference src. * @deprecated */ ImageLoadState[ImageLoadState["errorLoaded"] = 3] = "errorLoaded"; })(ImageLoadState || (ImageLoadState = {})); //# sourceMappingURL=Image.types.js.map