Use tailwind typography plugin by default (#3593)
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
This commit is contained in:
parent
2883e541a9
commit
2c4310d9ff
@ -40,7 +40,7 @@ class Html(Div):
|
|||||||
given_class_name = props.pop("class_name", [])
|
given_class_name = props.pop("class_name", [])
|
||||||
if isinstance(given_class_name, str):
|
if isinstance(given_class_name, str):
|
||||||
given_class_name = [given_class_name]
|
given_class_name = [given_class_name]
|
||||||
props["class_name"] = ["rx-Html", *given_class_name]
|
props["class_name"] = ["rx-Html", "prose", *given_class_name]
|
||||||
|
|
||||||
# Create the component.
|
# Create the component.
|
||||||
return super().create(**props)
|
return super().create(**props)
|
||||||
|
@ -194,7 +194,7 @@ class Config(Base):
|
|||||||
cors_allowed_origins: List[str] = ["*"]
|
cors_allowed_origins: List[str] = ["*"]
|
||||||
|
|
||||||
# Tailwind config.
|
# Tailwind config.
|
||||||
tailwind: Optional[Dict[str, Any]] = {}
|
tailwind: Optional[Dict[str, Any]] = {"plugins": ["@tailwindcss/typography"]}
|
||||||
|
|
||||||
# Timeout when launching the gunicorn server. TODO(rename this to backend_timeout?)
|
# Timeout when launching the gunicorn server. TODO(rename this to backend_timeout?)
|
||||||
timeout: int = 120
|
timeout: int = 120
|
||||||
|
@ -19,7 +19,7 @@ def test_html_create():
|
|||||||
assert str(html.dangerouslySetInnerHTML) == '({ ["__html"] : "<p>Hello !</p>" })' # type: ignore
|
assert str(html.dangerouslySetInnerHTML) == '({ ["__html"] : "<p>Hello !</p>" })' # type: ignore
|
||||||
assert (
|
assert (
|
||||||
str(html)
|
str(html)
|
||||||
== '<div className={"rx-Html"} dangerouslySetInnerHTML={({ ["__html"] : "<p>Hello !</p>" })}/>'
|
== '<div className={"rx-Html prose"} dangerouslySetInnerHTML={({ ["__html"] : "<p>Hello !</p>" })}/>'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -37,5 +37,5 @@ def test_html_fstring_create():
|
|||||||
)
|
)
|
||||||
assert (
|
assert (
|
||||||
str(html)
|
str(html)
|
||||||
== f'<div className={{"rx-Html"}} dangerouslySetInnerHTML={{{str(html.dangerouslySetInnerHTML)}}}/>' # type: ignore
|
== f'<div className={{"rx-Html prose"}} dangerouslySetInnerHTML={{{str(html.dangerouslySetInnerHTML)}}}/>' # type: ignore
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user