mirror of
https://github.com/charmbracelet/gum
synced 2024-06-29 10:40:28 +02:00
docs: add join comment with example
This commit is contained in:
parent
9e483004fc
commit
b58dc52fc8
15
gum.go
15
gum.go
|
@ -96,7 +96,20 @@ type Gum struct {
|
||||||
Style style.Options `cmd:"" help:"Style some text."`
|
Style style.Options `cmd:"" help:"Style some text."`
|
||||||
|
|
||||||
// Join provides a shell script interface for the lipgloss JoinHorizontal
|
// Join provides a shell script interface for the lipgloss JoinHorizontal
|
||||||
// and JoinVertical commands.
|
// and JoinVertical commands. It allows you to join multi-line text to
|
||||||
|
// build different layouts.
|
||||||
|
//
|
||||||
|
// For example, you can place two bordered boxes next to each other:
|
||||||
|
// Note: We wrap the variable in quotes to ensure the new lines are part of a
|
||||||
|
// single argument. Otherwise, the command won't work as expected.
|
||||||
|
//
|
||||||
|
// $ gum join --horizontal "$BUBBLE_BOX" "$GUM_BOX"
|
||||||
|
//
|
||||||
|
// ╔══════════════════════╗╔═════════════╗
|
||||||
|
// ║ ║║ ║
|
||||||
|
// ║ Bubble ║║ Gum ║
|
||||||
|
// ║ ║║ ║
|
||||||
|
// ╚══════════════════════╝╚═════════════╝
|
||||||
//
|
//
|
||||||
Join join.Options `cmd:"" help:"Join text horizontally or vertically."`
|
Join join.Options `cmd:"" help:"Join text horizontally or vertically."`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue