Skip to content

Add a theme provider#88

Open
SjaakSchilperoort wants to merge 1 commit intodevelopfrom
feature/add-theme-provider
Open

Add a theme provider#88
SjaakSchilperoort wants to merge 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
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

1 participant