/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */ import * as React from "react"; import { Animated, StyleSheet, ViewProps, StyleProp, ViewStyle, View, } from "react-native"; import shadow from "../styles/shadow"; import overlay from "../styles/overlay"; import { withTheme } from "../core/theming"; import themeT from "../styles/DefaultTheme"; type Props = { style?: StyleProp; theme: typeof themeT; } & ViewProps; const Surface: React.FC = ({ style, theme, children, ...rest }) => { const { elevation = 3, borderRadius: radius } = (StyleSheet.flatten(style) || {}) as ViewStyle; const { dark: isDarkTheme, mode, colors } = theme; const borderRadius = radius || theme.roundness; return ( {children} ); }; export default withTheme(Surface);