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

Method WithTheme

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

Source from the content-addressed store, hash-verified

408}
409
410func (m *multiSelectSearchField) WithTheme(theme huh.Theme) huh.Field {
411 if m.theme != nil {
412 return m
413 }
414 m.theme = theme
415
416 styles := theme.Theme(m.hasDarkBg)
417 st := m.search.Styles()
418 st.Cursor.Color = styles.Focused.TextInput.Cursor.GetForeground()
419 st.Focused.Prompt = styles.Focused.TextInput.Prompt
420 st.Focused.Text = styles.Focused.TextInput.Text
421 st.Focused.Placeholder = styles.Focused.TextInput.Placeholder
422 m.search.SetStyles(st)
423
424 return m
425}
426
427func (m *multiSelectSearchField) WithKeyMap(k *huh.KeyMap) huh.Field {
428 return m

Callers 3

WithThemeFunction · 0.80
newFormMethod · 0.80
newFormMethod · 0.80

Calls 1

ThemeMethod · 0.65

Tested by

no test coverage detected