RenderErrorBox renders an error/warning message with a rounded border box
(title string)
| 413 | |
| 414 | // RenderErrorBox renders an error/warning message with a rounded border box |
| 415 | func RenderErrorBox(title string) []string { |
| 416 | if tty.IsStderrTerminal() { |
| 417 | box := lipgloss.NewStyle(). |
| 418 | Border(styles.RoundedBorder). |
| 419 | BorderForeground(styles.ColorError). |
| 420 | Padding(1, 2). |
| 421 | Bold(true). |
| 422 | Render(title) |
| 423 | return []string{box} |
| 424 | } |
| 425 | |
| 426 | return []string{ |
| 427 | FormatErrorMessage(title), |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | // RenderInfoSection renders an info section with left border emphasis |
| 432 | func RenderInfoSection(content string) []string { |