Skip to content

Commit

Permalink
Revert "fix: allow theme to be set only once"
Browse files Browse the repository at this point in the history
This reverts commit b6644a1.
  • Loading branch information
maaslalani committed Feb 29, 2024
1 parent ce6d377 commit 51377e6
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions field_confirm.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ func (c *Confirm) String() string {

// WithTheme sets the theme of the confirm field.
func (c *Confirm) WithTheme(theme *Theme) Field {
if c.theme != nil {
return c
}
c.theme = theme
return c
}
Expand Down
3 changes: 0 additions & 3 deletions field_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ func (i *Input) WithAccessible(accessible bool) Field {

// WithTheme sets the theme of the input field.
func (i *Input) WithTheme(theme *Theme) Field {
if i.theme != nil {
return i
}
i.theme = theme
return i
}
Expand Down
3 changes: 0 additions & 3 deletions field_multiselect.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,6 @@ func (m *MultiSelect[T]) runAccessible() error {

// WithTheme sets the theme of the multi-select field.
func (m *MultiSelect[T]) WithTheme(theme *Theme) Field {
if m.theme != nil {
return m
}
m.theme = theme
m.filter.Cursor.Style = m.theme.Focused.TextInput.Cursor
m.filter.PromptStyle = m.theme.Focused.TextInput.Prompt
Expand Down
3 changes: 0 additions & 3 deletions field_note.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ func (n *Note) runAccessible() error {

// WithTheme sets the theme on a note field.
func (n *Note) WithTheme(theme *Theme) Field {
if n.theme != nil {
return n
}
n.theme = theme
return n
}
Expand Down
3 changes: 0 additions & 3 deletions field_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@ func (s *Select[T]) runAccessible() error {

// WithTheme sets the theme of the select field.
func (s *Select[T]) WithTheme(theme *Theme) Field {
if s.theme != nil {
return s
}
s.theme = theme
s.filter.Cursor.Style = s.theme.Focused.TextInput.Cursor
s.filter.PromptStyle = s.theme.Focused.TextInput.Prompt
Expand Down
3 changes: 0 additions & 3 deletions field_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,6 @@ func (t *Text) runAccessible() error {

// WithTheme sets the theme on a text field.
func (t *Text) WithTheme(theme *Theme) Field {
if t.theme != nil {
return t
}
t.theme = theme
return t
}
Expand Down

0 comments on commit 51377e6

Please sign in to comment.