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() } }