chore(ui/styles): lazify createStyles
This commit is contained in:
parent
abf89e3695
commit
1a660c9606
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { lazyDestructure } from "@lib/utils/lazy";
|
||||
import { lazyDestructure, proxyLazy } from "@lib/utils/lazy";
|
||||
import { findByProps, findByPropsProxy } from "@metro/utils";
|
||||
import { isSemanticColor, resolveSemanticColor } from "@ui/color";
|
||||
import { DiscordTextStyles } from "@ui/types";
|
||||
|
|
@ -13,7 +13,7 @@ export const { TextStyleSheet } = lazyDestructure(() => findByProps("TextStyleSh
|
|||
};
|
||||
|
||||
export function createStyles<T extends NamedStyles<T>>(sheet: T | ((props: any) => T)): () => T {
|
||||
return CompatfulRedesign.createStyles(sheet);
|
||||
return proxyLazy(() => CompatfulRedesign.createStyles(sheet));
|
||||
}
|
||||
|
||||
// Reimplementation of Discord's createThemedStyleSheet, which was removed since 204201
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue