(id, mode int, title, placeholder string, colors ...lipgloss.Color)
| 75 | } |
| 76 | |
| 77 | func NewFileInput(id, mode int, title, placeholder string, colors ...lipgloss.Color) FileInput { |
| 78 | w := textinput.New() |
| 79 | w.Prompt = title |
| 80 | w.Placeholder = placeholder |
| 81 | w.Width = 25 |
| 82 | w.PromptStyle = lipgloss.NewStyle().Foreground(colors[0]).Bold(true) |
| 83 | w.PlaceholderStyle = lipgloss.NewStyle().Foreground(colors[1]) |
| 84 | w.TextStyle = lipgloss.NewStyle().Foreground(colors[2]) |
| 85 | return FileInput{id: id, mode: mode, widget: w} |
| 86 | } |
| 87 | |
| 88 | type FileInputReader struct { |
| 89 | Id int |