-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmailInput.java
More file actions
23 lines (21 loc) · 870 Bytes
/
Copy pathEmailInput.java
File metadata and controls
23 lines (21 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package elements;
import com.slack.api.model.block.Blocks;
import com.slack.api.model.block.InputBlock;
import com.slack.api.model.block.composition.BlockCompositions;
import com.slack.api.model.block.element.BlockElements;
/**
* Allows user to enter an email into a single-line field.
* {@link https://docs.slack.dev/reference/block-kit/block-elements/email-input-element/}
*/
public class EmailInput {
/**
* An input block with an email input element.
*/
public static InputBlock example01() {
InputBlock block = Blocks.input(i -> i.blockId("input123")
.label(BlockCompositions.plainText("Email Address"))
.element(BlockElements.emailTextInput(e -> e.actionId("email_text_input-action")
.placeholder(BlockCompositions.plainText("Enter an email")))));
return block;
}
}