mirror of
https://github.com/anotherhadi/ilovetui.git
synced 2026-08-21 03:55:48 +02:00
21b574eb6f
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
26 lines
841 B
Go
26 lines
841 B
Go
package bubbles
|
|
|
|
import (
|
|
"charm.land/bubbles/v2/filepicker"
|
|
|
|
"github.com/anotherhadi/ilovetui/style"
|
|
)
|
|
|
|
func NewFilePicker() filepicker.Model {
|
|
f := filepicker.New()
|
|
s := filepicker.DefaultStyles()
|
|
s.Cursor = s.Cursor.Foreground(style.S.Primary)
|
|
s.DisabledCursor = s.DisabledCursor.Foreground(style.S.Subtle)
|
|
s.Symlink = s.Symlink.Foreground(style.S.Warning)
|
|
s.Directory = s.Directory.Foreground(style.S.Primary)
|
|
s.File = s.File.Foreground(style.S.Text)
|
|
s.DisabledFile = s.DisabledFile.Foreground(style.S.Subtle)
|
|
s.Permission = s.Permission.Foreground(style.S.Muted)
|
|
s.Selected = s.Selected.Foreground(style.S.Primary)
|
|
s.DisabledSelected = s.DisabledSelected.Foreground(style.S.Subtle)
|
|
s.FileSize = s.FileSize.Foreground(style.S.Muted)
|
|
s.EmptyDirectory = s.EmptyDirectory.Foreground(style.S.Subtle)
|
|
f.Styles = s
|
|
return f
|
|
}
|