MCPcopy Index your code
hub / github.com/cli/cli / WithTheme

Method WithTheme

internal/prompter/multi_select_with_search.go:422–437  ·  view source on GitHub ↗
(theme huh.Theme)

Source from the content-addressed store, hash-verified

420}
421
422func (m *multiSelectSearchField) WithTheme(theme huh.Theme) huh.Field {
423 if m.theme != nil {
424 return m
425 }
426 m.theme = theme
427
428 styles := theme.Theme(m.hasDarkBg)
429 st := m.search.Styles()
430 st.Cursor.Color = styles.Focused.TextInput.Cursor.GetForeground()
431 st.Focused.Prompt = styles.Focused.TextInput.Prompt
432 st.Focused.Text = styles.Focused.TextInput.Text
433 st.Focused.Placeholder = styles.Focused.TextInput.Placeholder
434 m.search.SetStyles(st)
435
436 return m
437}
438
439func (m *multiSelectSearchField) WithKeyMap(k *huh.KeyMap) huh.Field {
440 return m

Callers 3

WithThemeFunction · 0.80
newFormMethod · 0.80
newFormMethod · 0.80

Calls 1

ThemeMethod · 0.65

Tested by

no test coverage detected