From d0f4e87475990b5b5c142cef53a9c12463475535 Mon Sep 17 00:00:00 2001 From: Beef Date: Tue, 3 Jan 2023 00:17:58 +0000 Subject: [PATCH] [Styles] Switch to createThemedStylesheet --- src/lib/metro/common.ts | 1 + src/ui/settings/components/AssetDisplay.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/metro/common.ts b/src/lib/metro/common.ts index 451e832..82f2889 100644 --- a/src/lib/metro/common.ts +++ b/src/lib/metro/common.ts @@ -6,6 +6,7 @@ export const channels = findByProps("getVoiceChannelId"); export const i18n = findByProps("Messages"); export const url = findByProps("openURL"); export const toasts = find(m => m.open && m.close && !m.startDrag && !m.init && !m.openReplay && !m.setAlwaysOnTop); +export const stylesheet = findByProps("createThemedStyleSheet"); // React export const React = findByProps("createElement") as typeof import("react"); diff --git a/src/ui/settings/components/AssetDisplay.tsx b/src/ui/settings/components/AssetDisplay.tsx index 807a1b4..2a945d4 100644 --- a/src/ui/settings/components/AssetDisplay.tsx +++ b/src/ui/settings/components/AssetDisplay.tsx @@ -1,5 +1,5 @@ import { Asset } from "@types"; -import { ReactNative as RN } from "@metro/common"; +import { ReactNative as RN, stylesheet } from "@metro/common"; import { showToast } from "@ui/toasts"; import { getAssetIDByName } from "@ui/assets"; import { Forms } from "@ui/components"; @@ -11,7 +11,7 @@ interface AssetDisplayProps { const { FormRow } = Forms; -const styles = RN.StyleSheet.create({ +const styles = stylesheet.createThemedStyleSheet({ asset: { width: 32, height: 32,