UNPKG

@microsoft/teams.cards

Version:

<p> <a href="https://www.npmjs.com/package/@microsoft/teams.cards" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.cards" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.cards?activeTab=code" ta

49 lines (47 loc) 1.15 kB
'use strict'; class BackgroundImage { type; /** * The URL (or data url) of the image. Acceptable formats are PNG, JPEG, and GIF */ url; /** * Describes how the image should fill the area. */ fillMode; /** * Describes how the image should be aligned if it must be cropped or if using repeat fill mode. */ horizontalAlignment; /** * Describes how the image should be aligned if it must be cropped or if using repeat fill mode. */ verticalAlignment; constructor(url, options = {}) { this.type = "BackgroundImage"; this.url = url; Object.assign(this, options); } static from(options) { return new BackgroundImage(options.url, options); } withUrl(value) { this.url = value; return this; } withFillMode(value) { this.fillMode = value; return this; } withHorizontalAlignment(value) { this.horizontalAlignment = value; return this; } withVerticalAlignment(value) { this.verticalAlignment = value; return this; } } exports.BackgroundImage = BackgroundImage; //# sourceMappingURL=background-image.js.map //# sourceMappingURL=background-image.js.map