gitstack

grindlemire/go-tui code browser

302 B Go 15 lines 2026-06-03 · d15bb9f raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package tui

// WithWidthAuto sets width to auto (size to content).
func WithWidthAuto() Option {
	return func(e *Element) {
		e.style.Width = Auto()
	}
}

// WithHeightAuto sets height to auto (size to content).
func WithHeightAuto() Option {
	return func(e *Element) {
		e.style.Height = Auto()
	}
}