Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): honor native iOS glass appearance #24926

OpenPixPMusic(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/24926/headopened View on GitHub

Showing 3 changed files with 5 additions and 22 deletions.

x
0 of 3 viewed, 3 left
3 additions and 11 deletionsapps/mobile/src/components/ui/GlassSurface.tsxModified
View file
@@ -25,7 +25,6 @@
readonly ref?: Ref<ViewInstance>;
readonly children: ReactNode;
readonly glassEffectStyle?: "clear" | "regular" | "none";
- // null leaves UIKit's material untinted instead of applying the theme tint.
readonly tintColor?: ColorValue | null;
readonly tintColorClassName?: string;
readonly chrome?: "default" | "none";
@@ -49,7 +48,7 @@
const { themeAppearance } = useAppearancePreferences();
const isDarkMode = themeAppearance === "dark";
const supportsGlass = Platform.OS === "ios" && isGlassEffectAPIAvailable();
- const hasShadow = chrome !== "none" && Platform.OS !== "android";
+ const hasShadow = !supportsGlass && chrome !== "none" && Platform.OS !== "android";
const surfaceStyle: ViewStyle = {
borderRadius: MOBILE_SHAPE.glass,
overflow: "hidden",
@@ -65,17 +64,10 @@
<ThemedGlassView
{...props}
ref={ref}
- className={cn(
- chrome === "none"
- ? "border-0 border-transparent bg-transparent"
- : "border border-border bg-glass-surface",
- className,
- )}
+ className={cn("border-0 border-transparent bg-transparent", className)}