make PopoverTruncated customizable
This commit is contained in:
parent
5c5fd5f26a
commit
6b7a96dc06
|
@ -68,8 +68,8 @@ def Popover(
|
|||
)
|
||||
|
||||
|
||||
def PopoverTruncated(input_string: str) -> str:
|
||||
if (truncated := truncate(input_string)) != input_string:
|
||||
def PopoverTruncated(input_string: str, length: int = 30, ellipsis: str = "…") -> str:
|
||||
if (truncated := truncate(input_string, length, ellipsis)) != input_string:
|
||||
return Popover(wrapped_content=truncated, popover_content=input_string)
|
||||
else:
|
||||
return input_string
|
||||
|
|
Loading…
Reference in New Issue