(title, content string, width int)
| 7 | ) |
| 8 | |
| 9 | func Render(title, content string, width int) string { |
| 10 | styleTitle := styles.TabTitleStyle |
| 11 | styleBody := styles.TabStyle |
| 12 | |
| 13 | return styles.NoStyle.PaddingBottom(1).Render( |
| 14 | lipgloss.JoinVertical(lipgloss.Top, |
| 15 | lipgloss.PlaceHorizontal(width, lipgloss.Left, |
| 16 | styleTitle.PaddingRight(1).Render(title), |
| 17 | lipgloss.WithWhitespaceChars("─"), |
| 18 | lipgloss.WithWhitespaceStyle(styleTitle), |
| 19 | ), |
| 20 | styles.RenderComposite(styleBody.Width(width), content), |
| 21 | ), |
| 22 | ) |
| 23 | } |