mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 12:46:14 +00:00
feat(textarea): add helpers for default light and dark styles
This commit is contained in:
+11
-1
@@ -290,7 +290,7 @@ func New() Model {
|
||||
vp.KeyMap = viewport.KeyMap{}
|
||||
cur := cursor.New()
|
||||
|
||||
styles := DefaultStyles(true)
|
||||
styles := DefaultDarkStyles()
|
||||
|
||||
m := Model{
|
||||
CharLimit: defaultCharLimit,
|
||||
@@ -348,6 +348,16 @@ func DefaultStyles(isDark bool) Styles {
|
||||
return s
|
||||
}
|
||||
|
||||
// DefaultLightStyles returns the default styles for a light background.
|
||||
func DefaultLightStyles() Styles {
|
||||
return DefaultStyles(false)
|
||||
}
|
||||
|
||||
// DefaultDarkStyles returns the default styles for a dark background.
|
||||
func DefaultDarkStyles() Styles {
|
||||
return DefaultStyles(true)
|
||||
}
|
||||
|
||||
// SetValue sets the value of the text input.
|
||||
func (m *Model) SetValue(s string) {
|
||||
m.Reset()
|
||||
|
||||
Reference in New Issue
Block a user