vrnimje / quick-ftxui

A Quick & Easy way to render terminal user interfaces, using FTXUI.
https://vrnimje.github.io/quick-ftxui-docs/
5 stars 1 forks source link

[Feature] Adding paragraph, and made minor change to text's grammar #15

Closed vrnimje closed 1 year ago

vrnimje commented 1 year ago

Syntax for Paragraph is:

RedLight Paragraph("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")

Output:

https://github.com/vrnimje/quick-ftxui/assets/103848930/25b32b61-3142-4b88-99f4-6ad677809ad4

Difference between Paragraph and Text is that Text doesn't adapt to the terminal window size, meaning its contents will overflow. Paragraph does, as demonstrated above

Also, syntax for Text is now changed, from text, to maintain consistency with other dom/components

References #5