ButtonElement
init
Creates a ButtonElement
instance.
Name | Type | Required | Default | Description |
---|---|---|---|---|
text |
| true | The text for the button. Maximum length of 75. | |
callback |
| false |
| A callback function to configure the |
Return: The ButtonElement
instance.
url
Sets the link URL for the ButtonElement
instance.
Name | Type | Required | Default | Description |
---|---|---|---|---|
linkUrl |
| true | The link URL for the button instance. Maximum length of 3000 characters. |
Return: The ButtonElement
instance.
id
Sets a custom identifier for the ButtonElement
instance.
Name | Type | Required | Default | Description |
---|---|---|---|---|
id |
| true | The custom identifier for the |
Return: The ButtonElement
instance.
value
Sets the value for the ButtonElement
instance.
Name | Type | Required | Default | Description |
---|---|---|---|---|
value |
| true | The value for the |
Return: The ButtonElement
instance.
primary
Sets the style of the ButtonElement
to primary
.
Name | Type | Required | Default | Description |
---|---|---|---|---|
No arguments |
Return: The ButtonElement
instance.
danger
Sets the style of the ButtonElement
to danger
.
Name | Type | Required | Default | Description |
---|---|---|---|---|
No arguments |
Return: The ButtonElement
instance.
confirm
Sets the confirm object for the ButtonElement
instance.
Name | Type | Required | Default | Description |
---|---|---|---|---|
text |
| true | The text of the confirm object. | |
callback |
| false | A callback function to configure the confirm object. |
Return: The newly created ConfirmObject
instance.
accessibilityLabel
Sets the accessibility label for the button.
Name | Type | Required | Default | Description |
---|---|---|---|---|
label |
| true | The accessibility label for the button. Maximum length of 75 characters. |
Return: The ButtonElement
instance.
getMemento
Converts the ButtonElement
instance to a serializable format.
Name | Type | Required | Default | Description |
---|---|---|---|---|
No arguments |
Return: (struct
) A struct representing this ButtonElement
instance.
Last updated