Skip to content

Commit

Permalink
Fix layout module name
Browse files Browse the repository at this point in the history
  • Loading branch information
guetteman committed Jun 10, 2024
1 parent ca11923 commit 918e4fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions examples/multiple_pages/about.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
tea "github.com/charmbracelet/bubbletea"
components "github.com/taecontrol/tui/layout"
"github.com/taecontrol/tui/layout"
"github.com/taecontrol/tui/navigation/item"
"github.com/taecontrol/tui/navigation/navbar"
)
Expand Down Expand Up @@ -43,10 +43,10 @@ func (m About) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}

func (m About) View() string {
return components.NewLayout(
return layout.NewLayout(
m.Height,
m.Width,
"About",
components.WithHeader(m.Navbar.View()),
layout.WithHeader(m.Navbar.View()),
).Render()
}
1 change: 1 addition & 0 deletions examples/multiple_pages/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module github.com/taecontrol/tui/examples/multiple_pages

go 1.22.3
replace github.com/taecontrol/tui => ../../

require (
github.com/charmbracelet/bubbletea v0.26.4
Expand Down
6 changes: 3 additions & 3 deletions examples/multiple_pages/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
tea "github.com/charmbracelet/bubbletea"
components "github.com/taecontrol/tui/layout"
"github.com/taecontrol/tui/layout"
"github.com/taecontrol/tui/navigation/item"
"github.com/taecontrol/tui/navigation/navbar"
)
Expand Down Expand Up @@ -42,10 +42,10 @@ func (m Home) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}

func (m Home) View() string {
return components.NewLayout(
return layout.NewLayout(
m.Height,
m.Width,
"Home",
components.WithHeader(m.Navbar.View()),
layout.WithHeader(m.Navbar.View()),
).Render()
}
2 changes: 1 addition & 1 deletion layout/layout.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package components
package layout

import "github.com/charmbracelet/lipgloss"

Expand Down

0 comments on commit 918e4fc

Please sign in to comment.