-
Notifications
You must be signed in to change notification settings - Fork 184
Theme can't be changed for ipywidgets and solara.Markdown widget #635
Copy link
Copy link
Closed
Description
Hello!
Changing theme with ThemeToggle does not apply to ipywidgets and solara.Markdown widget. They always use the theme that was applied during the initial page load. Here is an example page:
import textwrap
import reacton.ipywidgets as rw
import solara
@solara.component
def Layout(children):
dark_effective = solara.lab.use_dark_effective()
return solara.AppLayout(children=children, toolbar_dark=dark_effective, color=None)
@solara.component
def Page():
with solara.AppBar():
solara.lab.ThemeToggle()
rw.Button(description="Some button")
rw.IntText(value=7, description="Some int:", disabled=False)
rw.HTMLMath(value=r"$\text{Some equation:}\ \int f(x) dx$")
solara.Markdown(
textwrap.dedent(
r"""
# This is a title
## This is a subtitle
This is a markdown text, **bold** and *italic* text is supported.
## Math
Also, $x^2$ is rendered as math.
Or multiline math:
$$
\int_0^1 x^2 dx = \frac{1}{3}
$$
"""
)
)UPD: I tried to create an example on app.py.cafe, but ipywidget styles seems to be broken there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
