You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the "style" attribute in the dictionary based questions only supports basic text based styling attribute but doesn't allow passing the style class instance.
Describe the solution
custom_style_fancy=Style(
[
("separator", "fg:#cc5454"),
("qmark", "fg:#673ab7 bold"),
("question", ""),
("selected", "fg:#cc5454"),
("pointer", "fg:#673ab7 bold"),
("highlighted", "fg:#673ab7 bold"),
("answer", "fg:#f44336 bold"),
("text", "fg:#FBE9E7"),
("disabled", "fg:#858585 italic"),
]
)
defask_dictstyle(**kwargs):
questions= [
{
# just print a message, don't ask a question# does not require a name (but if provided, is ignored) and does not return a value"type": "print",
"name": "intro",
"message": "This example demonstrates advanced features! 🦄",
"style": custom_style_fancy
}
]
returnprompt(questions, **kwargs)
if__name__=="__main__":
print(ask_dictstyle())
Alternatives considered
Although similar results can be obtained by using the pythonic style, but it eludes the simplicity of the dictionary based question generation.
The text was updated successfully, but these errors were encountered:
Describe the problem
Currently, the "style" attribute in the dictionary based questions only supports basic text based styling attribute but doesn't allow passing the style class instance.
Describe the solution
Alternatives considered
Although similar results can be obtained by using the pythonic style, but it eludes the simplicity of the dictionary based question generation.
The text was updated successfully, but these errors were encountered: