From e9cc7a4b9bab8ce3091adedbbaab49fc0d92557a Mon Sep 17 00:00:00 2001 From: Iisakki Rotko Date: Thu, 2 Jan 2025 14:44:44 +0100 Subject: [PATCH] docs: make theming example work in dark mode --- .../pages/documentation/components/lab/theming.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/solara/website/pages/documentation/components/lab/theming.py b/solara/website/pages/documentation/components/lab/theming.py index 25cafc602..f504fa280 100644 --- a/solara/website/pages/documentation/components/lab/theming.py +++ b/solara/website/pages/documentation/components/lab/theming.py @@ -27,6 +27,8 @@ ## Example +**Note**: Light and dark theme colors have to be set separately. + ```solara import solara import solara.lab @@ -35,14 +37,14 @@ def change_color(colors): if "purple" in colors: - theme.themes.light.info = "#8617c2" + theme.themes.light.info = theme.themes.dark.info = "#8617c2" else: - theme.themes.light.info = "#2196f3" + theme.themes.light.info = theme.themes.dark.info = "#2196f3" if "green" in colors: - theme.themes.light.error = "#33bd65" + theme.themes.light.error = theme.themes.dark.error = "#33bd65" else: - theme.themes.light.error = "#ff5252" + theme.themes.light.error = theme.themes.dark.error = "#ff5252" @solara.component