File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 1
1
package navigation
2
2
3
3
import (
4
- "github.com/charmbracelet/bubbles/textinput"
5
4
"regexp"
6
5
"strings"
6
+
7
+ "github.com/charmbracelet/bubbles/textinput"
8
+ "github.com/maaslalani/slides/styles"
7
9
)
8
10
9
11
// Model is an interface for models.model, so that cycle imports are avoided
@@ -23,9 +25,12 @@ type Search struct {
23
25
}
24
26
25
27
func NewSearch () Search {
26
- sti := textinput .NewModel ()
27
- sti .Placeholder = "search..."
28
- return Search {SearchTextInput : sti }
28
+ ti := textinput .NewModel ()
29
+ ti .Placeholder = "search"
30
+ ti .Prompt = "/"
31
+ ti .PromptStyle = styles .Search
32
+ ti .TextStyle = styles .Search
33
+ return Search {SearchTextInput : ti }
29
34
}
30
35
31
36
func (s * Search ) Query () string {
Original file line number Diff line number Diff line change @@ -18,15 +18,12 @@ const (
18
18
)
19
19
20
20
var (
21
- Author = lipgloss .NewStyle ().Foreground (salmon ).Align (lipgloss .Left ).MarginLeft (2 )
22
- Date = lipgloss .NewStyle ().Faint (true ).Align (lipgloss .Left ).Margin (0 , 1 )
23
- Page = lipgloss .NewStyle ().Foreground (salmon ).Align (lipgloss .Right ).MarginRight (3 )
24
- Slide = lipgloss .NewStyle ().Padding (1 )
25
- Status = lipgloss .NewStyle ().Padding (1 )
26
- ActionStatus = lipgloss .NewStyle ().
27
- Foreground (salmon ).
28
- Align (lipgloss .Left ).
29
- MarginLeft (3 )
21
+ Author = lipgloss .NewStyle ().Foreground (salmon ).Align (lipgloss .Left ).MarginLeft (2 )
22
+ Date = lipgloss .NewStyle ().Faint (true ).Align (lipgloss .Left ).Margin (0 , 1 )
23
+ Page = lipgloss .NewStyle ().Foreground (salmon ).Align (lipgloss .Right ).MarginRight (3 )
24
+ Slide = lipgloss .NewStyle ().Padding (1 )
25
+ Status = lipgloss .NewStyle ().Padding (1 )
26
+ Search = lipgloss .NewStyle ().Faint (true ).Align (lipgloss .Left ).MarginLeft (2 )
30
27
)
31
28
32
29
var (
You can’t perform that action at this time.
0 commit comments