From 1f0d9ec8452f15c27cd33c4e3874454c35993743 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 8 Apr 2025 14:37:33 +0200 Subject: Use internal/pkg structure --- ui/views/tabs.go | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 ui/views/tabs.go (limited to 'ui/views/tabs.go') diff --git a/ui/views/tabs.go b/ui/views/tabs.go deleted file mode 100644 index 13e3672..0000000 --- a/ui/views/tabs.go +++ /dev/null @@ -1,32 +0,0 @@ -package views - -import ( - "fmt" - - "github.com/charmbracelet/lipgloss" -) - -type TabType int - -var ( - tabStyle = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).BorderForeground(highlightColor).Padding(0, 2) - inactiveTabStyle = tabStyle - activeTabStyle = tabStyle -) - -func getTabsRow(tabsText []string, activeTab TabType) string { - tabs := make([]string, len(tabsText)) - - for i, tab := range tabsText { - if TabType(i) == activeTab { - tabs[i] = fmt.Sprintf("%s %s", altCodeStyle.Render(fmt.Sprintf("Alt+%d", i+1)), lipgloss.NewStyle().Bold(true).Foreground(highlightColor).Render(tab)) - tabs[i] = activeTabStyle.Foreground(highlightColor).Render(tabs[i]) - } else { - tabs[i] = fmt.Sprintf("%s %s", altCodeStyle.Render(fmt.Sprintf("Alt+%d", i+1)), lipgloss.NewStyle().Render(tab)) - tabs[i] = inactiveTabStyle.Foreground(highlightColor).Render(tabs[i]) - } - } - - return lipgloss.JoinHorizontal(lipgloss.Top, tabs...) - -} -- cgit v1.2.3-18-g5258