Skip to content

Commit

Permalink
doc: update readme and removed used height
Browse files Browse the repository at this point in the history
  • Loading branch information
elewis787 committed Apr 22, 2022
1 parent 19dde82 commit 04b686b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,22 @@ The key lines are:
rootCmd.SetHelpFunc(boa.HelpFunc)
```

To futher customize the look and feel of boa, you can optional set additional styles

```go
boa.TitleStyle.BorderForeground(lipgloss.AdaptiveColor{Light: `#E3BD2D`, Dark: `#E3BD2D`})
boa.BorderStyle.BorderForeground(lipgloss.AdaptiveColor{Light: `#E3BD2D`, Dark: `#E3BD2D`})
```

Use the documentation to see a full list of styles that can be set.

## Demo

![demo](demo.gif)

## Used by
- [rkl](https://github.com/elewis787/rkl)
- [m8](https://github.com/kochavalabs/m8)

## Future work
- Eval how styles are exported. Goal is to make it easy to customize the layout without needing to build a cmd parser for cobra
Expand Down
3 changes: 1 addition & 2 deletions styles.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const (

var (
// default width of the help/usage output. To override supply a width to the style you want to increase
width = 100
height = 50
width = 100
// Style of the border
BorderStyle = lipgloss.NewStyle().
Padding(0, 1, 0, 1).
Expand Down

0 comments on commit 04b686b

Please sign in to comment.