MCPcopy
hub / github.com/mum4k/termdash / UseIndicatorSet

Function UseIndicatorSet

widgets/checkbox/options.go:108–117  ·  view source on GitHub ↗

UseIndicatorSet sets both checkbox indicator strings from a reusable group.

(set IndicatorSet)

Source from the content-addressed store, hash-verified

106
107// UseIndicatorSet sets both checkbox indicator strings from a reusable group.
108func UseIndicatorSet(set IndicatorSet) Option {
109 return option(func(opts *options) {
110 if set.Unchecked != "" {
111 opts.indicator.Unchecked = set.Unchecked
112 }
113 if set.Checked != "" {
114 opts.indicator.Checked = set.Checked
115 }
116 })
117}
118
119// LabelGap sets the number of blank cells between the indicator and label.
120func LabelGap(cells int) Option {

Callers 6

newControlsTabFunction · 0.92
explorerCheckboxVariantsFunction · 0.92
mainFunction · 0.92
NewAlertControlFunction · 0.92
newStatusControlsFunction · 0.92
TestOptionsAndHelpersFunction · 0.70

Calls 1

optionFuncType · 0.70

Tested by 1

TestOptionsAndHelpersFunction · 0.56