pysepal.solara.theme.resolve_theme_state#

pysepal.solara.theme.resolve_theme_state(theme_state=None)[source]#

Return a usable ThemeState.

Precedence: an explicit theme_state, else the current scope’s, which get_current_theme_state() creates on demand for every runtime including scripts and pytest.

Parameters:

theme_state (ThemeState | None) – An explicit state to use instead of the scope’s.

Returns:

The theme state to render with.

Return type:

ThemeState