
* 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
38 lines
583 B
Python
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"
|