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