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

47 lines (46 loc) 1.13 kB
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; } } export { BackgroundImage }; //# sourceMappingURL=background-image.mjs.map //# sourceMappingURL=background-image.mjs.map