(Component):add<Type>
Used to create a new component, but returns the parent component so it can be chained.
Synopsis
Parameters
Typestring- This is the component type that you want to create.
componentComponent- The initial values for the component, such as
id.
Returns
parentComponentComponent- Returns the caller table, so it can be chained
Examples
local list = tab:newList()
:addText({ text = "My awesome List" })
:addAlert({ text = "We can add siblings easily!" })
:newContainer()
:newCardBody()
:addCardTitle({ text = "Card title" })
:addCardText({ text = "Card Text" })
:addCardFooter({ text = "Card Text" })
.back
.back
:addText({ text = "The bottom of the list" })