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

@@ -30,7 +30,7 @@ use tui::{
layout::{Corner, Rect},
style::Style,
text::{Span, Spans},
widgets::{Block, BorderType, Borders, List, ListItem},
widgets::{Block, BorderType, List, ListItem},
};
// -- state
@@ -107,7 +107,7 @@ impl Component for Table {
List::new(list_items)
.block(
Block::default()
.borders(Borders::ALL)
.borders(self.props.borders)
.border_style(Style::default())
.border_type(BorderType::Rounded)
.title(title),