mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
Some checks failed
🤖 Android APK Build / 🏗️ Build Android APK (push) Has been cancelled
🤖 iOS IPA Build / 🏗️ Build iOS IPA (push) Has been cancelled
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (push) Has been cancelled
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (push) Has been cancelled
🕒 Handle Stale Issues / 🗑️ Cleanup Stale Issues (push) Has been cancelled
37 lines
735 B
TypeScript
37 lines
735 B
TypeScript
import { BlurView } from "expo-blur";
|
|
import type React from "react";
|
|
import { Platform, View, type ViewProps } from "react-native";
|
|
|
|
interface Props extends ViewProps {
|
|
blurAmount?: number;
|
|
blurType?: "light" | "dark" | "xlight";
|
|
}
|
|
|
|
/**
|
|
* BlurView for iOS and simple View for Android
|
|
*/
|
|
export const PlatformBlurView: React.FC<Props> = ({
|
|
blurAmount = 100,
|
|
blurType = "light",
|
|
style,
|
|
children,
|
|
...props
|
|
}) => {
|
|
if (Platform.OS === "ios") {
|
|
return (
|
|
<BlurView style={style} intensity={blurAmount} {...props}>
|
|
{children}
|
|
</BlurView>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<View
|
|
style={[{ backgroundColor: "rgba(50, 50, 50, 0.9)" }, style]}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</View>
|
|
);
|
|
};
|