Skip to content

Commit

Permalink
[#1772] Fix deprecated API ui.Paragraph
Browse files Browse the repository at this point in the history
Fix following error message:
---

Deprecated API:
The `ui.Paragraph` and `ui.ListItem` elements have been deprecated in Yazi
v0.4.
Please use the new `ui.Text` instead, in your `eza-preview.yazi` plugin. See
issue #1772 for details: sxyazi/yazi#1772
  • Loading branch information
pierreay committed Dec 24, 2024
1 parent 7ca4c25 commit 4429f59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ function M:peek()
)
elseif empty_output then
ya.preview_widgets(self, {
ui.Paragraph(self.area, { ui.Line("No items") })
:align(ui.Paragraph.CENTER),
ui.Text({ ui.Line("No items") }):area(self.area)
:align(ui.Text.CENTER),
})
else
ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) })
Expand Down

0 comments on commit 4429f59

Please sign in to comment.