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 crossterm::event::{KeyCode, KeyModifiers};
use tui::{
layout::Rect,
style::Style,
widgets::{Block, BorderType, Borders, Paragraph},
widgets::{Block, BorderType, Paragraph},
};
// -- states
@@ -199,7 +199,7 @@ impl Component for Input {
})
.block(
Block::default()
.borders(Borders::ALL)
.borders(self.props.borders)
.border_type(BorderType::Rounded)
.title(title),
);