diff options
| author | Jay V <[email protected]> | 2025-05-21 15:01:25 -0400 |
|---|---|---|
| committer | Jay V <[email protected]> | 2025-05-21 15:01:25 -0400 |
| commit | 9049295cc961b250be6144585dde322e778534d7 (patch) | |
| tree | c8a2f09ed6cea54eb9587243eb7dbe298fef1b20 /internal/tui/layout | |
| parent | 4526b14b17dc49f3ef4f3b1a1d02eff5c6b6b59f (diff) | |
| parent | dff8e77eb6d1709fa1ddeb52d0d9c19afd13d385 (diff) | |
| download | opencode-9049295cc961b250be6144585dde322e778534d7.tar.gz opencode-9049295cc961b250be6144585dde322e778534d7.zip | |
Merge branch 'dev' into docs
Diffstat (limited to 'internal/tui/layout')
| -rw-r--r-- | internal/tui/layout/container.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/internal/tui/layout/container.go b/internal/tui/layout/container.go index 08b10fdd6..b5bdca20a 100644 --- a/internal/tui/layout/container.go +++ b/internal/tui/layout/container.go @@ -11,16 +11,16 @@ type Container interface { tea.Model Sizeable Bindings - Focus() // Add focus method - Blur() // Add blur method + Focus() + Blur() } + type container struct { width int height int content tea.Model - // Style options paddingTop int paddingRight int paddingBottom int @@ -32,7 +32,7 @@ type container struct { borderLeft bool borderStyle lipgloss.Border - focused bool // Track focus state + focused bool } func (c *container) Init() tea.Cmd { @@ -152,16 +152,13 @@ func (c *container) Blur() { type ContainerOption func(*container) func NewContainer(content tea.Model, options ...ContainerOption) Container { - c := &container{ content: content, borderStyle: lipgloss.NormalBorder(), } - for _, option := range options { option(c) } - return c } |
