expo-app/src/Components/Card/index.js

30 lines
616 B
JavaScript

import { useContext } from "react";
import { ScrollView, View } from "react-native";
import { AppContext } from "../../utils";
export default function Card({ children }) {
const appContext = useContext(AppContext);
return (
<View
style={{
paddingTop: 10,
paddingLeft: 20,
paddingRight: 20,
paddingBottom: 10,
}}
>
<View
style={{
borderRadius: 20,
backgroundColor: appContext.appTheme.card.backgroundColor,
elevation: 5,
padding: 20,
}}
>
{children}
</View>
</View>
);
}