Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base provides basic helper functionality for all (non-view) models. It should be a field in all models but cannot be embedded in the idiomatic Go manner. This has the advantage of the parent being able to control which of the Base methods are exposed. Maybe it is possible to do embedded though? Open to suggestions!
func (Base) AvailableWidth ¶
AvailableWidth returns the width of the block minus the margins.
func (*Base) Height ¶
Pass through to lipgloss.Style Height Height sets the height of the block before applying margins. If the height of the text block is less than this value after applying padding (or not), the block will be set to this height.
func (*Base) Margin ¶
Pass through to lipgloss.Style Margin Margin is a shorthand method for setting margins on all sides at once.
With one argument, the value is applied to all sides.
With two arguments, the value is applied to the vertical and horizontal sides, in that order.
With three arguments, the value is applied to the top side, the horizontal sides, and the bottom side, in that order.
With four arguments, the value is applied clockwise starting from the top side, followed by the right side, then the bottom, and finally the left.
With more than four arguments no margin will be added.