Apply default theme to apps (#2320)
This commit is contained in:
parent
97f528e7b5
commit
cfb9d44e0c
@ -43,6 +43,7 @@ from reflex.components.navigation.client_side_routing import (
|
||||
Default404Page,
|
||||
wait_for_client_redirect,
|
||||
)
|
||||
from reflex.components.radix import themes
|
||||
from reflex.config import get_config
|
||||
from reflex.event import Event, EventHandler, EventSpec
|
||||
from reflex.middleware import HydrateMiddleware, Middleware
|
||||
@ -131,7 +132,7 @@ class App(Base):
|
||||
background_tasks: Set[asyncio.Task] = set()
|
||||
|
||||
# The radix theme for the entire app
|
||||
theme: Optional[Component] = None
|
||||
theme: Optional[Component] = themes.theme(accent_color="blue")
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Initialize the app.
|
||||
|
@ -1199,7 +1199,7 @@ def compilable_app(tmp_path) -> Generator[tuple[App, Path], None, None]:
|
||||
web_dir = app_path / ".web"
|
||||
web_dir.mkdir(parents=True)
|
||||
(web_dir / "package.json").touch()
|
||||
app = App()
|
||||
app = App(theme=None)
|
||||
app.get_frontend_packages = unittest.mock.Mock()
|
||||
with chdir(app_path):
|
||||
yield app, web_dir
|
||||
|
Loading…
Reference in New Issue
Block a user