33 lines
877 B
TypeScript
33 lines
877 B
TypeScript
import React from 'react';
|
|
import { View, Text } from 'react-native';
|
|
import { AppButton } from './AppButton';
|
|
|
|
interface EmptyStateProps {
|
|
title: string;
|
|
description?: string;
|
|
actionLabel?: string;
|
|
onAction?: () => void;
|
|
icon?: string;
|
|
}
|
|
|
|
export const EmptyState: React.FC<EmptyStateProps> = ({
|
|
title,
|
|
description,
|
|
actionLabel,
|
|
onAction,
|
|
icon = '📭',
|
|
}) => {
|
|
return (
|
|
<View className="flex-1 items-center justify-center px-8 py-16">
|
|
<Text className="text-5xl mb-4">{icon}</Text>
|
|
<Text className="text-lg font-semibold text-gray-800 text-center mb-2">{title}</Text>
|
|
{description && (
|
|
<Text className="text-sm text-gray-500 text-center mb-6">{description}</Text>
|
|
)}
|
|
{actionLabel && onAction && (
|
|
<AppButton title={actionLabel} onPress={onAction} className="min-w-[160px]" />
|
|
)}
|
|
</View>
|
|
);
|
|
};
|