Skip to content

Add a theme provider#88

Merged
SjaakSchilperoort merged 1 commit intodevelopfrom
feature/add-theme-provider
Mar 26, 2026
Merged

Add a theme provider#88
SjaakSchilperoort merged 1 commit intodevelopfrom
feature/add-theme-provider

Conversation

@SjaakSchilperoort
Copy link
Member

Resolves: #87

The following has been implemented:

  • Add a theme provider that can be used by the apps to set a theme
  • Add a useTheme hook to use the theme from the theme provider
  • Add a useStyles hook to insert the current theme in a stylesheet factory method
  • Turn the eslint rule no-unused-styles off, as this only works for static stylesheets

For all components:

  • Replace all static imports of theme by the useTheme hook
  • For all stylesheets that depend on theme, convert the static stylesheet to a factory method

Specifics:

  • Create factory methods for LargeButtonStyles, so theme can be inserted
  • Remove the FilterButton component, as this was based on static theming. The code is inlined in ObsIdentify's ObservationFilterBar.

Adapt components to use a dynamic theme
@SjaakSchilperoort SjaakSchilperoort merged commit 94def5a into develop Mar 26, 2026
2 checks passed
@SjaakSchilperoort SjaakSchilperoort deleted the feature/add-theme-provider branch March 26, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce a ThemeProvider and useTheme hook

2 participants