diff --git a/src/components/Appbar/Appbar.tsx b/src/components/Appbar/Appbar.tsx
index d4a5875986..d59c626769 100644
--- a/src/components/Appbar/Appbar.tsx
+++ b/src/components/Appbar/Appbar.tsx
@@ -254,6 +254,7 @@ const Appbar = ({
!theme.isV3 && { elevation },
]}
elevation={elevation as MD3Elevation}
+ container
{...rest}
>
{shouldAddLeftSpacing ? : null}
diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx
index 5e343c5785..09aa344d55 100644
--- a/src/components/Banner.tsx
+++ b/src/components/Banner.tsx
@@ -194,6 +194,7 @@ const Banner = ({
{...rest}
style={[!theme.isV3 && styles.elevation, { opacity }, style]}
theme={theme}
+ container
{...(theme.isV3 && { elevation })}
>
diff --git a/src/components/BottomNavigation/BottomNavigationBar.tsx b/src/components/BottomNavigation/BottomNavigationBar.tsx
index 1453b07ebf..05264c610a 100644
--- a/src/components/BottomNavigation/BottomNavigationBar.tsx
+++ b/src/components/BottomNavigation/BottomNavigationBar.tsx
@@ -574,6 +574,7 @@ const BottomNavigationBar = ({
: 'none'
}
onLayout={onLayout}
+ container
>
>
}
{...(isV3 && { elevation: elevation })}
+ container
>
{isMode('outlined') && (
diff --git a/src/components/Chip/Chip.tsx b/src/components/Chip/Chip.tsx
index 8ed23b7436..0e48e5c145 100644
--- a/src/components/Chip/Chip.tsx
+++ b/src/components/Chip/Chip.tsx
@@ -316,6 +316,7 @@ const Chip = ({
{...rest}
testID={`${testID}-container`}
theme={theme}
+ container
>
(
pointerEvents={visible ? 'auto' : 'none'}
testID={`${testID}-container`}
{...(isV3 && { elevation: md3Elevation })}
+ container
>
(
!isV3 && disabled && styles.disabled,
style,
]}
+ container
{...(isV3 && { elevation: 0 })}
>
{(scrollableMenuHeight && (
{children}
diff --git a/src/components/Searchbar.tsx b/src/components/Searchbar.tsx
index 11c79d2e9a..b8bf345e9d 100644
--- a/src/components/Searchbar.tsx
+++ b/src/components/Searchbar.tsx
@@ -275,6 +275,7 @@ const Searchbar = forwardRef(
]}
testID={`${testID}-container`}
{...(theme.isV3 && { elevation })}
+ container
theme={theme}
>
diff --git a/src/components/Surface.tsx b/src/components/Surface.tsx
index fc551f688d..3b46d099e1 100644
--- a/src/components/Surface.tsx
+++ b/src/components/Surface.tsx
@@ -51,6 +51,10 @@ export type Props = Omit, 'style'> & {
*/
testID?: string;
ref?: React.RefObject;
+ /**
+ * @internal
+ */
+ container?: boolean;
};
const MD2Surface = forwardRef(
@@ -161,6 +165,7 @@ const SurfaceIOS = forwardRef<
testID,
children,
mode = 'elevated',
+ container,
...props
},
ref
@@ -202,12 +207,15 @@ const SurfaceIOS = forwardRef<
...(isElevated && getStyleForShadowLayer(elevation, 1)),
...filteredStyles,
...borderRadiusStyles,
- flex: flattenedStyles.height || flattenedStyles.flex ? 1 : undefined,
+ flex:
+ flattenedStyles.height || (!container && flattenedStyles.flex)
+ ? 1
+ : undefined,
backgroundColor: bgColor,
};
return [outerLayerViewStyles, innerLayerViewStyles];
- }, [style, elevation, backgroundColor, mode]);
+ }, [style, elevation, backgroundColor, mode, container]);
return (