import type { PropsWithChildren, ReactNode } from "react"; import { StatusBar } from "expo-status-bar"; import { memo, useMemo } from "react"; import { StyleSheet, View, type ViewStyle } from "react-native"; import { useTheme } from "@/hooks/useTheme"; const styles = StyleSheet.create({ centered: { justifyContent: "center", alignItems: "center", flex: 1, }, paddedContainer: { padding: 12, flex: 1, }, container: { flex: 1, }, }); export const centeredDecorator = (storyFn: () => ReactNode) => ( {storyFn()} ); export const paddingDecorator = (storyFn: () => ReactNode) => ( {storyFn()} ); const BackgroundStory = memo(({ children }: PropsWithChildren) => { const { colors } = useTheme(); const containerStyles = useMemo( () => [ styles.container, { backgroundColor: colors.background.primary, }, ], [colors] ); return ( {children} ); }); BackgroundStory.displayName = "BackgroundStory"; export const backgroundDecorator = (storyFn: () => ReactNode) => ( {storyFn()} );