1
0
forked from lug/matterbridge

Update dependencies (#886)

This commit is contained in:
Wim
2019-09-07 22:46:58 +02:00
committed by GitHub
parent 1dc93ec4f0
commit a3bee01e0a
145 changed files with 24283 additions and 16572 deletions

View File

@@ -3,6 +3,9 @@ package slack
// TextInputSubtype Accepts email, number, tel, or url. In some form factors, optimized input is provided for this subtype.
type TextInputSubtype string
// TextInputOption handle to extra inputs options.
type TextInputOption func(*TextInputElement)
const (
// InputSubtypeEmail email keyboard
InputSubtypeEmail TextInputSubtype = "email"
@@ -26,8 +29,8 @@ type TextInputElement struct {
}
// NewTextInput constructor for a `text` input
func NewTextInput(name, label, text string) *TextInputElement {
return &TextInputElement{
func NewTextInput(name, label, text string, options ...TextInputOption) *TextInputElement {
t := &TextInputElement{
DialogInput: DialogInput{
Type: InputTypeText,
Name: name,
@@ -35,6 +38,12 @@ func NewTextInput(name, label, text string) *TextInputElement {
},
Value: text,
}
for _, opt := range options {
opt(t)
}
return t
}
// NewTextAreaInput constructor for a `textarea` input