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

57 lines (54 loc) 1.09 kB
'use strict'; var base = require('./base'); class ToggleInput extends base.InputElement { type; /** * Title for the toggle */ title; /** * The initial selected value. If you want the toggle to be initially on, set this to the value of valueOn‘s value. */ value; /** * The value when toggle is off */ valueOff; /** * The value when toggle is on */ valueOn; /** * If `true`, allow text to wrap. Otherwise, text is clipped. */ wrap; constructor(title, options = {}) { super(); this.type = "Input.Toggle"; this.title = title; this.withOptions(options); } withOptions(value) { Object.assign(this, value); return this; } withValue(value) { this.value = value; return this; } withValueOff(value) { this.valueOff = value; return this; } withValueOn(value) { this.valueOn = value; return this; } withWrap(value = true) { this.wrap = value; return this; } } exports.ToggleInput = ToggleInput; //# sourceMappingURL=toggle.js.map //# sourceMappingURL=toggle.js.map