Allow named css values to be overriden

This commit is contained in:
Zoe Roux
2023-01-10 16:49:09 +09:00
parent 34adf8e65a
commit 29f52e0da0
4 changed files with 77 additions and 62 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ import {
Theme,
ThemeProvider,
useAutomaticTheme,
useStyleRegistry,
} from "yoshiki";
declare module "yoshiki" {
@@ -43,7 +44,7 @@ const AppName = () => {
};
const BrowserOnlyRegistry = ({ children }: { children: JSX.Element }) => {
const registry = useMemo(() => createStyleRegistry(), []);
const registry = useStyleRegistry();
if (typeof window === "undefined") return children;
return <StyleRegistryProvider registry={registry}>{children}</StyleRegistryProvider>;
};