ratatui_toolkit/widgets/file_system_tree/constructors/
with_dir_style.rs1use crate::widgets::file_system_tree::{FileSystemTree, FileSystemTreeConfig};
2
3impl<'a> FileSystemTree<'a> {
4 pub fn with_dir_style(mut self, style: ratatui::style::Style) -> Self {
5 self.config.dir_style = style;
6 self
7 }
8}
9
10#[allow(dead_code)]
11pub fn with_dir_style(tree: FileSystemTree, style: ratatui::style::Style) -> FileSystemTree {
12 FileSystemTree {
13 config: FileSystemTreeConfig {
14 dir_style: style,
15 ..tree.config
16 },
17 ..tree
18 }
19}