@pyreon/styler 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +2 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createContext, h, onUnmount, popContext, pushContext, useContext } from "@pyreon/core";
1
+ import { createContext, h, provide, useContext } from "@pyreon/core";
2
2
 
3
3
  //#region src/resolve.ts
4
4
  /**
@@ -692,8 +692,7 @@ const ThemeContext = createContext({});
692
692
  const useTheme = () => useContext(ThemeContext);
693
693
  /** Provides a theme object to all nested styled components via Pyreon context. */
694
694
  function ThemeProvider({ theme, children }) {
695
- pushContext(new Map([[ThemeContext.id, theme]]));
696
- onUnmount(() => popContext());
695
+ provide(ThemeContext, theme);
697
696
  return children ?? null;
698
697
  }
699
698
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/styler",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/pyreon/ui-system",