RowBuilder
RowBuilder
It’s a constructor function that takes an object as an argument and sets the type property to 1 and the components property to the components property of the object if it exists, otherwise it sets it to an empty array
Kind: global class
- RowBuilder
- new RowBuilder([data])
- .addComponents(button) ⇒
RowBuilder
- .build() ⇒
Array.<object>
new RowBuilder([data])
It’s a constructor function that takes an object as an argument and sets the type property to 1 and the components property to the components property of the object if it exists, otherwise it sets it to an empty array.
Param | Description |
---|---|
[data] | The data object that is passed to the constructor. |
rowBuilder.addComponents(button) ⇒ RowBuilder
Add a button to the row.
Kind: instance method of RowBuilder
Returns: RowBuilder
- The updated RowBuilder object.
Param | Type | Description |
---|---|---|
button | object | Button object to add to the row. |
rowBuilder.build() ⇒ Array.<object>
Returns the button row.
Kind: instance method of RowBuilder
Returns: Array.<object>
- The button row as an array of button objects.