public static class ButtonElement.ButtonElementBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
ButtonElement.ButtonElementBuilder |
actionId(String actionId)
An identifier for this action.
|
ButtonElement |
build() |
ButtonElement.ButtonElementBuilder |
confirm(ConfirmationDialogObject confirm)
A confirm object that defines an optional confirmation dialog after the button is clicked.
|
ButtonElement.ButtonElementBuilder |
style(String style)
Decorates buttons with alternative visual color schemes.
|
ButtonElement.ButtonElementBuilder |
text(PlainTextObject text)
A text object that defines the button's text.
|
String |
toString() |
ButtonElement.ButtonElementBuilder |
url(String url)
A URL to load in the user's browser when the button is clicked.
|
ButtonElement.ButtonElementBuilder |
value(String value)
The value to send along with the interaction payload.
|
public ButtonElement.ButtonElementBuilder text(PlainTextObject text)
public ButtonElement.ButtonElementBuilder actionId(String actionId)
public ButtonElement.ButtonElementBuilder url(String url)
public ButtonElement.ButtonElementBuilder value(String value)
public ButtonElement.ButtonElementBuilder style(String style)
`primary` gives buttons a green outline and text, ideal for affirmation or confirmation actions. `primary` should only be used for one button within a set.
`danger` gives buttons a red outline and text, and should be used when the action is destructive. Use danger even more sparingly than `primary`.
If you don't include this field, the `default` button style will be used.
public ButtonElement.ButtonElementBuilder confirm(ConfirmationDialogObject confirm)
public ButtonElement build()
Copyright © 2020. All rights reserved.