mirror of
https://github.com/zoriya/yoshiki.git
synced 2026-06-07 04:05:11 +00:00
Allow named css values to be overriden
This commit is contained in:
@@ -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>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user