tui-big-text-v0.5.0
github-actions
released this
25 Jul 08:19
·
35 commits
to main
since this release
🚀 Features
-
(tui-big-text) Add alignment helper methods
Adds helper methods to the
BigTextBuilder
struct to set the alignment
of the text. This makes it simpler to set the alignment of the text.let left = BigText::builder() .left_aligned() .lines(vec!["Left".white().into()]) .build()?; let right = BigText::builder() .right_aligned() .lines(vec!["Right".green().into()]) .build()?; let centered = BigText::builder() .centered() .lines(vec!["Centered".red().into()]) .build()?;
-
(tui-big-text) [breaking] Make
BigText
builder infallible (#14)BigTextBuilder.build() no longer returns a Result. Instead it returns
the BigText widget directly. This change is made to simplify rendering
code which often otherwise doesn't have any error conditions.This also makes the fields on BigText public (marked as non-exhaustive)
BREAKING CHANGE:BigTextBuilder.build() no longer returns a Result.
Remove the
?
/expect
/unwrap
calls code which calls the build
method.let big_text = BigText::builder() .lines(vec![Line::from("SingleLine")]) - .build()?; + .build();
📚 Documentation
- Simplify tui-big-text examples