From 148439f15da317ddd36a42b2d782b9692fe3cc4b Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 5 Nov 2024 13:40:37 -0500 Subject: [PATCH] feat(help): expose function for choosing light or dark styles --- help/help.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/help/help.go b/help/help.go index d9e814b..11dc0c7 100644 --- a/help/help.go +++ b/help/help.go @@ -41,7 +41,10 @@ type Styles struct { FullSeparator lipgloss.Style } -func newStyles(isDark bool) Styles { +// DefaultStyles returns a set of default styles for the help bubble. Light or +// dark styles can be selected by passing true or false to the isDark +// parameter. +func DefaultStyles(isDark bool) Styles { lightDark := lipgloss.LightDark(isDark) keyStyle := lipgloss.NewStyle().Foreground(lightDark("#909090", "#626262")) @@ -61,12 +64,12 @@ func newStyles(isDark bool) Styles { // DefaultDarkStyles returns a set of default styles for dark backgrounds. func DefaultDarkStyles() Styles { - return newStyles(true) + return DefaultStyles(true) } // DefaultLightStyles returns a set of default styles for light backgrounds. func DefaultLightStyles() Styles { - return newStyles(false) + return DefaultStyles(false) } // Model contains the state of the help view.