diff options
Diffstat (limited to 'packages/tui/internal/components/toast')
| -rw-r--r-- | packages/tui/internal/components/toast/toast.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/tui/internal/components/toast/toast.go b/packages/tui/internal/components/toast/toast.go index 09b3c6288..2de6bf619 100644 --- a/packages/tui/internal/components/toast/toast.go +++ b/packages/tui/internal/components/toast/toast.go @@ -90,9 +90,9 @@ func (tm *ToastManager) Update(msg tea.Msg) (*ToastManager, tea.Cmd) { func (tm *ToastManager) renderSingleToast(toast Toast) string { t := theme.CurrentTheme() - baseStyle := styles.BaseStyle(). - Background(t.BackgroundElement()). + baseStyle := styles.NewStyle(). Foreground(t.Text()). + Background(t.BackgroundElement()). Padding(1, 2) maxWidth := max(40, layout.Current.Viewport.Width/3) @@ -101,15 +101,14 @@ func (tm *ToastManager) renderSingleToast(toast Toast) string { // Build content with wrapping var content strings.Builder if toast.Title != nil { - titleStyle := lipgloss.NewStyle(). - Foreground(toast.Color). + titleStyle := styles.NewStyle().Foreground(toast.Color). Bold(true) content.WriteString(titleStyle.Render(*toast.Title)) content.WriteString("\n") } // Wrap message text - messageStyle := lipgloss.NewStyle() + messageStyle := styles.NewStyle() contentWidth := lipgloss.Width(toast.Message) if contentWidth > contentMaxWidth { messageStyle = messageStyle.Width(contentMaxWidth) |
