TypeScript Function API • Docs
TypeScript Function API / asset_builder / PropWidgetDefinitionBuilder
Class: PropWidgetDefinitionBuilder
Create a widget for interacting with a prop that is displayed in the modelling view.
Example
const validation = new PropWidgetDefinitionBuilder()
.setKind("text")
.build()
Implements
Constructors
new PropWidgetDefinitionBuilder()
new PropWidgetDefinitionBuilder():
PropWidgetDefinitionBuilder
Returns
Defined in
Properties
propWidget
propWidget:
PropWidgetDefinition
Defined in
Methods
setKind()
setKind(
kind
):this
The type of widget
Parameters
• kind: PropWidgetDefinitionKind
{PropWidgetDefinitionKind} [array | checkbox | color | comboBox | header | map | select | text | textArea | codeEditor | password]
Returns
this
this
Example
.setKind("color")
Implementation of
IPropWidgetDefinitionBuilder
.setKind
Defined in
addOption()
addOption(
key
,value
):this
Add an option when using a comboBox
Parameters
• key: string
the value displayed in the comboBox
• value: string
the value the prop is set to
Returns
this
this
Example
.setOption("us-east-2 - US East (Ohio)", "us-east-2")
Implementation of
IPropWidgetDefinitionBuilder
.addOption
Defined in
build()
build():
PropWidgetDefinition
Build the object
Returns
Example
.build()
Implementation of
IPropWidgetDefinitionBuilder
.build