import { Ionicons } from '@expo/vector-icons'; import type { ReactNode } from 'react'; import { StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native'; import { AppText } from './app-text'; import { Card } from './card'; import { colors, radius, spacing } from './tokens'; type Props = { icon: keyof typeof Ionicons.glyphMap; title: string; message: string; action?: ReactNode; style?: StyleProp; }; export function EmptyState({ icon, title, message, action, style }: Props) { return {title} {message} {action ? {action} : null} ; } const styles = StyleSheet.create({ icon: { width: 48, height: 48, borderRadius: radius.control, backgroundColor: colors.brand.sky, alignItems: 'center', justifyContent: 'center', alignSelf: 'center' }, title: { marginTop: spacing[4], textAlign: 'center' }, message: { marginTop: spacing[2], textAlign: 'center' }, action: { marginTop: spacing[5], alignSelf: 'stretch' }, });