-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paragraph wrapped in a block can not be styled as expected #990
Labels
bug
Something isn't working
Comments
Changing diff --git a/code/ratatui-json-editor-app/src/ui.rs b/code/ratatui-json-editor-app/src/ui.rs
index edccbaa..8b47d4d 100644
--- a/code/ratatui-json-editor-app/src/ui.rs
+++ b/code/ratatui-json-editor-app/src/ui.rs
@@ -29,7 +29,7 @@ pub fn ui(f: &mut Frame, app: &App) {
.borders(Borders::ALL)
.style(Style::default());
- let title = Paragraph::new(Text::styled(
+ let title = Paragraph::new(Line::styled(
"Create New Json",
Style::default().fg(Color::Green),
)) But yeah, I'd also expect |
It works ! Thank you for your help ! |
joshka
added a commit
that referenced
this issue
Mar 21, 2024
Paragraph was ignoring the new style field on Text added in 0.26.0 Fixes: #990
joshka
added a commit
that referenced
this issue
Mar 22, 2024
Paragraph was ignoring the new `Text::style` field added in 0.26.0 Fixes: #990
joshka
added a commit
to nowNick/ratatui
that referenced
this issue
May 24, 2024
…#992) Paragraph was ignoring the new `Text::style` field added in 0.26.0 Fixes: ratatui-org#990
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I was following the tutorial on the JSON editor: https://ratatui.rs/tutorials/json-editor/ and noticed a dissimilarity of result after compilation on the title step.
The tutorial offer to write this:
And I was expecting to get a box with white borders surrounding a green text saying "Create new JSON" and after compilation I got a box with white borders and a white text.
To Reproduce
The easiest way to reproduce was to download the raratui website app here and run
cargo run
Expected behavior
I was expected that a code like this
would provide a white border box with a green text inside.
Screenshots
Environment
Additional context
I noticed that in version 0.25.0 this bug does not happen
Thanks for helping me !
The text was updated successfully, but these errors were encountered: