Borders to component properties

This commit is contained in:
veeso
2021-03-14 20:48:30 +01:00
parent 47c23c6828
commit a72ecb39e0
7 changed files with 14 additions and 14 deletions

View File

@@ -31,7 +31,7 @@ use tui::{
layout::{Corner, Rect},
style::{Color, Style},
text::Span,
widgets::{Block, Borders, List, ListItem, ListState},
widgets::{Block, List, ListItem, ListState},
};
// -- states
@@ -157,7 +157,7 @@ impl Component for FileList {
List::new(list_item)
.block(
Block::default()
.borders(Borders::ALL)
.borders(self.props.borders)
.border_style(match self.states.focus {
true => Style::default().fg(self.props.foreground),
false => Style::default(),