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

Method RenderView

internal/ui/installInput.go:125–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124
125func (m InstallModel) RenderView() string {
126 var b strings.Builder
127
128 for i := range m.inputs {
129 b.WriteString(m.inputs[i].View())
130 if i < len(m.inputs)-1 {
131 b.WriteRune('\n')
132 }
133 }
134 button := &blurredButton
135 if m.focusIndex == len(m.inputs) {
136 button = &focusedButton
137 }
138 fmt.Fprintf(&b, "\n\n%s\n\n", *button)
139
140 b.WriteString(helpStyle.Render("Use the arrow keys to navigate. Press enter to submit."))
141 return b.String()
142}
143
144func (m InstallModel) View() string {
145 val := m.RenderView()

Callers 1

ViewMethod · 0.95

Calls 1

ViewMethod · 0.45

Tested by

no test coverage detected