MCPcopy Create free account
hub / github.com/catppuccin/cli / NewInstallModel

Function NewInstallModel

internal/ui/installInput.go:29–53  ·  view source on GitHub ↗
(p string)

Source from the content-addressed store, hash-verified

27}
28
29func NewInstallModel(p string) InstallModel {
30 m := InstallModel{
31 inputs: make([]textinput.Model, 3),
32 }
33 var t textinput.Model
34 for i := range m.inputs {
35 t = textinput.New()
36 t.CursorStyle = cursorStyle
37 t.CharLimit = 50
38
39 switch i {
40 case 0:
41 t.Placeholder = "~/.config/" + p
42 t.Focus()
43 t.PromptStyle = focusedStyle
44 t.TextStyle = focusedStyle
45 case 1:
46 t.Placeholder = "~/.config/" + p
47 case 2:
48 t.Placeholder = "%appdata%/" + p
49 }
50 m.inputs[i] = t
51 }
52 return m
53}
54
55func (m InstallModel) Init() tea.Cmd {
56 return textinput.Blink

Callers 1

UpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected