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:
parent
130bcf96ca
commit
54c7b5a261
@ -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)
|
||||
|
@ -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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user