disable prose by default for rx.html (#4001)

* disable prose by default for rx.html

* remove styled

* put that on one line
This commit is contained in:
Khaleel Al-Adhami 2024-09-26 13:47:05 -07:00 committed by GitHub
parent 130bcf96ca
commit 54c7b5a261
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ class Html(Div):
given_class_name = props.pop("class_name", [])
if isinstance(given_class_name, str):
given_class_name = [given_class_name]
props["class_name"] = ["rx-Html", "prose", *given_class_name]
props["class_name"] = ["rx-Html", *given_class_name]
# Create the component.
return super().create(**props)

View File

@ -19,7 +19,7 @@ def test_html_create():
assert str(html.dangerouslySetInnerHTML) == '({ ["__html"] : "<p>Hello !</p>" })' # type: ignore
assert (
str(html)
== '<div className={"rx-Html prose"} dangerouslySetInnerHTML={({ ["__html"] : "<p>Hello !</p>" })}/>'
== '<div className={"rx-Html"} dangerouslySetInnerHTML={({ ["__html"] : "<p>Hello !</p>" })}/>'
)
@ -37,5 +37,5 @@ def test_html_fstring_create():
)
assert (
str(html)
== f'<div className={{"rx-Html prose"}} dangerouslySetInnerHTML={{{str(html.dangerouslySetInnerHTML)}}}/>' # type: ignore
== f'<div className={{"rx-Html"}} dangerouslySetInnerHTML={{{str(html.dangerouslySetInnerHTML)}}}/>' # type: ignore
)