28 lines
565 B
TypeScript
28 lines
565 B
TypeScript
import { useThemeColor } from "@/hooks/use-theme-color";
|
|
import { ReactNode } from "react";
|
|
import { StyleSheet, View } from "react-native";
|
|
|
|
interface PanelProps {
|
|
children?: ReactNode;
|
|
}
|
|
|
|
const Panel = ({children}: PanelProps) => {
|
|
const backgroundColor = useThemeColor({ }, 'background');
|
|
|
|
return (
|
|
<View style={[styles.panel, { backgroundColor }]}>
|
|
{children}
|
|
</View>
|
|
)
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
panel: {
|
|
padding: 15,
|
|
borderRadius: 5,
|
|
boxShadow: '0px 4px 5px 0px rgba(0,0,0,0.18)'
|
|
},
|
|
});
|
|
|
|
|
|
export default Panel; |