@@ -2,18 +2,16 @@ use super::{
2
2
visibility_blocking, CommandBlocking , CommandInfo , Component ,
3
3
DrawableComponent ,
4
4
} ;
5
- use crate :: {
6
- components:: dialog_paragraph, strings, ui, ui:: style:: Theme ,
7
- } ;
5
+ use crate :: { strings, ui, ui:: style:: Theme } ;
8
6
use anyhow:: Result ;
9
7
use crossterm:: event:: { Event , KeyCode } ;
10
8
use std:: borrow:: Cow ;
11
9
use strings:: commands;
12
10
use tui:: {
13
11
backend:: Backend ,
14
- layout:: Rect ,
12
+ layout:: { Alignment , Rect } ,
15
13
style:: Style ,
16
- widgets:: { Clear , Text } ,
14
+ widgets:: { Block , BorderType , Borders , Clear , Paragraph , Text } ,
17
15
Frame ,
18
16
} ;
19
17
@@ -75,7 +73,14 @@ impl DrawableComponent for TextInputComponent {
75
73
let area = ui:: centered_rect ( 60 , 20 , f. size ( ) ) ;
76
74
f. render_widget ( Clear , area) ;
77
75
f. render_widget (
78
- dialog_paragraph ( self . title . as_str ( ) , txt. iter ( ) ) ,
76
+ Paragraph :: new ( txt. iter ( ) )
77
+ . block (
78
+ Block :: default ( )
79
+ . title ( self . title . as_str ( ) )
80
+ . borders ( Borders :: ALL )
81
+ . border_type ( BorderType :: Thick ) ,
82
+ )
83
+ . alignment ( Alignment :: Left ) ,
79
84
area,
80
85
) ;
81
86
}
0 commit comments