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

94 lines (93 loc) 2.18 kB
class FlowLayout { type; /** * The space between items. * @default `default` */ columnSpacing; /** * Controls how the content of the container should be horizontally aligned. * @default `center` */ horizontalItemsAlignment; /** * Controls how item should fit inside the container. * @default `Fit` */ itemFit; /** * The width, in pixels, of each item, in the <number>px format. Should not be used if maxItemWidth and/or minItemWidth are set. * @example '<number>px' */ itemWidth; /** * The maximum width, in pixels, of each item, in the <number>px format. Should not be used if itemWidth is set. * @example '<number>px' */ maxItemWidth; /** * The minimum width, in pixels, of each item, in the <number>px format. Should not be used if itemWidth is set. * @example '<number>px' */ minItemWidth; /** * The space between rows of items. * @default `default` */ rowSpacing; /** * Controls for which card width the layout should be used. */ targetWidth; /** * Controls how the content of the container should be vertically aligned. * @default `top` */ verticalItemsAlignment; constructor(options = {}) { this.type = "Layout.Flow"; Object.assign(this, options); } static from(options) { return new FlowLayout(options); } withColumnSpacing(value) { this.columnSpacing = value; return this; } withHorizontalAlignment(value) { this.horizontalItemsAlignment = value; return this; } withItemFit(value) { this.itemFit = value; return this; } withItemWidth(value) { this.itemWidth = value; return this; } withItemMinWidth(value) { this.minItemWidth = value; return this; } withItemMaxWidth(value) { this.maxItemWidth = value; return this; } withRowSpacing(value) { this.rowSpacing = value; return this; } withTargetWidth(value) { this.targetWidth = value; return this; } withVerticalAlignment(value) { this.verticalItemsAlignment = value; return this; } } export { FlowLayout }; //# sourceMappingURL=flow.mjs.map //# sourceMappingURL=flow.mjs.map