mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-24 21:53:21 +00:00
docs(example): add break word behaviour to paragraph example
This commit is contained in:
parent
12e4f0d921
commit
f32fb022e0
1 changed files with 2 additions and 2 deletions
|
@ -170,11 +170,11 @@ fn ui<B: Backend>(f: &mut Frame<B>, app: &App) {
|
|||
f.render_widget(paragraph, chunks[2]);
|
||||
let paragraph = Paragraph::new(text)
|
||||
.style(Style::default().bg(Color::White).fg(Color::Black))
|
||||
.block(create_block("Right, wrap"))
|
||||
.block(create_block("Right, wrap (break words)"))
|
||||
.alignment(Alignment::Right)
|
||||
.wrap(Wrap {
|
||||
trim: true,
|
||||
break_words: false,
|
||||
break_words: true,
|
||||
});
|
||||
f.render_widget(paragraph, chunks[3]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue