reflex/reflex/components/base/document.py
macmoritz 9e0452beb0
pass lang and custom_attrs from app to html root (#2697)
* pass lang and custom_attrs from app to html root

* fix some pre-commit errors and try adding lang

* fix tests

* really fix test

* cleanup with @benedikt-bartscher

* fix props and tests

* use str instead of var

* change typing of html_custom_attrs to not allow Vars
2024-03-03 13:51:20 -08:00

38 lines
583 B
Python

"""Document components."""
from typing import Optional
from reflex.components.component import Component
class NextDocumentLib(Component):
"""Root document components."""
library = "next/document"
class Html(NextDocumentLib):
"""The document html."""
tag = "Html"
lang: Optional[str]
class DocumentHead(NextDocumentLib):
"""The document head."""
tag = "Head"
class Main(NextDocumentLib):
"""The document main section."""
tag = "Main"
class NextScript(NextDocumentLib):
"""The document main scripts."""
tag = "NextScript"