MCPcopy
hub / github.com/docker/docker-agent / Render

Function Render

pkg/tui/components/tab/tab.go:9–23  ·  view source on GitHub ↗
(title, content string, width int)

Source from the content-addressed store, hash-verified

7)
8
9func 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}

Callers 3

TestTabHeaderLineCountFunction · 0.92
renderTabMethod · 0.92
renderTabMethod · 0.92

Calls 4

RenderCompositeFunction · 0.92
PaddingRightMethod · 0.80
RenderMethod · 0.65
WidthMethod · 0.45

Tested by 1

TestTabHeaderLineCountFunction · 0.74