mirror of
https://github.com/ratatui-org/ratatui
synced 2025-02-16 22:18:51 +00:00
[examples] Clean user input example
This commit is contained in:
parent
299279dc2d
commit
d53ecaeade
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,6 @@ fn main() {
|
||||||
// Channels
|
// Channels
|
||||||
let (tx, rx) = mpsc::channel();
|
let (tx, rx) = mpsc::channel();
|
||||||
let input_tx = tx.clone();
|
let input_tx = tx.clone();
|
||||||
let clock_tx = tx.clone();
|
|
||||||
|
|
||||||
// Input
|
// Input
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
|
@ -115,6 +114,7 @@ fn draw(t: &mut Terminal<MouseBackend>, app: &App) {
|
||||||
.sizes(&[Size::Fixed(3), Size::Min(1)])
|
.sizes(&[Size::Fixed(3), Size::Min(1)])
|
||||||
.render(t, &app.size, |t, chunks| {
|
.render(t, &app.size, |t, chunks| {
|
||||||
Paragraph::default()
|
Paragraph::default()
|
||||||
|
.style(Style::default().fg(Color::Yellow))
|
||||||
.block(Block::default().borders(Borders::ALL).title("Input"))
|
.block(Block::default().borders(Borders::ALL).title("Input"))
|
||||||
.text(&app.input)
|
.text(&app.input)
|
||||||
.render(t, &chunks[0]);
|
.render(t, &chunks[0]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue