[@expo/ui] Expose option containerColor for BottomSheet in universal implementation
Daniel Gooß
When attempting to style the recently introduced BottomSheet component from @expo/ui with a opaque background color, this is only possible using the
background(Color)
modifiers from the respective packages.For Android there's an option though to set the
containerColor
prop:To make it easier for maintainers to use the universal module over the platform specific modules, would be very handy to expose this prop not only in Jetpack Compose
<ModalBottomSheet>
but as well for the universal <BottomSheet>
.In combination with the proposal of adding
presentationBackground
for Swift UI this could be mapped to a modifier for the Swift UI version:export function BottomSheet({
...
containerColor
}: BottomSheetProps) {
...
if (containerColor) {
presentationModifiers.push(
presentationBackground(containerColor)
);
}
return (...)
}