import React from 'react'; import { Platform, View, type ViewProps } from 'react-native'; import ReactNativeLiquidGlassContainer from './ReactNativeLiquidGlassContainerNativeComponent'; export interface LiquidGlassContainerProps extends ViewProps { /** * @description The spacing value for the glass container effect * * @default 0 * * @platform iOS */ spacing?: number; } /** * LiquidGlassContainer component * * A UIKit-based container that applies the iOS 26+ UIGlassContainerEffect. * This component uses the liquid glass container effect with configurable spacing. * * Platform: iOS only (iOS 26+) * * @platform ios * * @example * ```tsx * * Content inside glass container * * ``` */ export const LiquidGlassContainer: React.FC = ({ spacing = 0, style, children, ...rest }) => { const isCompatibleIOS = Platform.OS === 'ios' && parseInt(Platform.Version as string, 10) >= 26; if (!isCompatibleIOS) { // Fallback to regular View on non-iOS platforms or older iOS versions return ( {children} ); } return ( {children} ); };