forked from Mirrors/bubbletea
Set character limits on text input examples
This commit is contained in:
parent
b8bc66ed6f
commit
9e9e05774c
@ -31,6 +31,7 @@ func initialModel() model {
|
||||
inputModel := input.NewModel()
|
||||
inputModel.Placeholder = "Pikachu"
|
||||
inputModel.Focus()
|
||||
inputModel.CharLimit = 20
|
||||
|
||||
return model{
|
||||
textInput: inputModel,
|
||||
|
@ -43,14 +43,17 @@ func initialModel() model {
|
||||
name.Focus()
|
||||
name.Prompt = focusedPrompt
|
||||
name.TextColor = focusedTextColor
|
||||
name.CharLimit = 32
|
||||
|
||||
nickName := input.NewModel()
|
||||
nickName.Placeholder = "Nickname"
|
||||
nickName.Prompt = blurredPrompt
|
||||
nickName.CharLimit = 32
|
||||
|
||||
email := input.NewModel()
|
||||
email.Placeholder = "Email"
|
||||
email.Prompt = blurredPrompt
|
||||
email.CharLimit = 64
|
||||
|
||||
return model{0, name, nickName, email, blurredSubmitButton}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user