From d3314233bd610c953a6c6434470f9df5bcb1b494 Mon Sep 17 00:00:00 2001 From: Tom Gotsman <64492814+tgberkeley@users.noreply.github.com> Date: Wed, 15 Nov 2023 17:59:52 -0800 Subject: [PATCH] add in new no_of_lines prop for text (#2184) * add in new no_of_lines prop for text * black update --------- Co-authored-by: Tom Gotsman --- reflex/components/typography/text.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reflex/components/typography/text.py b/reflex/components/typography/text.py index e9c5c311e..b9c99b25b 100644 --- a/reflex/components/typography/text.py +++ b/reflex/components/typography/text.py @@ -12,3 +12,6 @@ class Text(ChakraComponent): # Override the tag. The default tag is `

`. as_: Var[str] + + # Truncate text after a specific number of lines. It will render an ellipsis when the text exceeds the width of the viewport or max_width prop. + no_of_lines: Var[int]