Skip to content

Commit 4ac4ded

Browse files
committed
remove extra pros
1 parent 258194b commit 4ac4ded

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/reactpy_django/components.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,11 @@ def django_js(static_path: str, key: Key | None = None):
156156

157157
def python_to_pyscript(
158158
file_path: str,
159-
extra_props: dict[str, Any] | None = None,
160159
initial: str | VdomDict | ComponentType = "",
161160
root: str = "root",
162161
):
163162
return _python_to_pyscript(
164163
file_path,
165-
extra_props=extra_props,
166164
initial=initial,
167165
root=root,
168166
)
@@ -308,15 +306,14 @@ def _cached_static_contents(static_path: str) -> str:
308306

309307
@component
310308
def _python_to_pyscript(
311-
file_path: str,
312-
extra_props: dict[str, Any] | None = None,
309+
*file_paths: str,
313310
initial: str | VdomDict | ComponentType = "",
314311
root: str = "root",
315312
):
316313
rendered, set_rendered = hooks.use_state(False)
317314
uuid = uuid4().hex.replace("-", "")
318315
initial = vdom_or_component_to_string(initial, uuid=uuid)
319-
executor = render_pyscript_template(file_path, uuid, root)
316+
executor = render_pyscript_template(file_paths, uuid, root)
320317

321318
if not rendered:
322319
# FIXME: This is needed to properly re-render PyScript such as
@@ -325,10 +322,9 @@ def _python_to_pyscript(
325322
set_rendered(True)
326323
return None
327324

328-
return html.div(
325+
return html._(
329326
html.div(
330-
(extra_props or {})
331-
| {"id": f"pyscript-{uuid}", "className": "pyscript", "data-uuid": uuid},
327+
{"id": f"pyscript-{uuid}", "className": "pyscript", "data-uuid": uuid},
332328
initial,
333329
),
334330
pyscript({"async": ""}, executor),

0 commit comments

Comments
 (0)