From 481c9d9dbd816227fc75a702cfb1aac667d61bf3 Mon Sep 17 00:00:00 2001 From: Brandon Hsiao Date: Mon, 12 Feb 2024 18:57:52 -0800 Subject: [PATCH] fix, lint --- reflex/components/radix/primitives/progress.py | 7 ++++++- reflex/components/radix/primitives/progress.pyi | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/reflex/components/radix/primitives/progress.py b/reflex/components/radix/primitives/progress.py index 8d502577a..08c79bbed 100644 --- a/reflex/components/radix/primitives/progress.py +++ b/reflex/components/radix/primitives/progress.py @@ -82,13 +82,18 @@ class Progress(SimpleNamespace): """High level API for progress bar. Args: + width: The width of the progerss bar **props: The props of the progress bar Returns: The progress bar. """ + + style = props.setdefault("style", {}) + style.update({"width": width}) + return ProgressRoot.create( - ProgressIndicator.create(width=width, value=props.get("value")), + ProgressIndicator.create(value=props.get("value")), **props, ) diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi index bc4a82b3c..61186c33b 100644 --- a/reflex/components/radix/primitives/progress.pyi +++ b/reflex/components/radix/primitives/progress.pyi @@ -275,6 +275,6 @@ class Progress(SimpleNamespace): indicator = staticmethod(ProgressIndicator.create) @staticmethod - def __call__(**props) -> Component: ... + def __call__(width: Optional[str] = "100%", **props) -> Component: ... progress = Progress()