@umituz/react-native-ai-creations 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-creations",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "AI-generated creations gallery with filtering, sharing, and management for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -5,18 +5,22 @@
5
5
 
6
6
  import React, { useMemo } from "react";
7
7
  import { View, StyleSheet } from "react-native";
8
- import { AtomicText, useAppDesignTokens } from "@umituz/react-native-design-system";
8
+ import { AtomicText, AtomicButton, useAppDesignTokens } from "@umituz/react-native-design-system";
9
9
 
10
10
  interface EmptyStateProps {
11
11
  readonly title: string;
12
12
  readonly description: string;
13
13
  readonly icon?: string;
14
+ readonly actionLabel?: string;
15
+ readonly onAction?: () => void;
14
16
  }
15
17
 
16
18
  export function EmptyState({
17
19
  title,
18
20
  description,
19
21
  icon = "🎨",
22
+ actionLabel,
23
+ onAction,
20
24
  }: EmptyStateProps) {
21
25
  const tokens = useAppDesignTokens();
22
26
 
@@ -43,9 +47,13 @@ export function EmptyState({
43
47
  ...tokens.typography.bodyMedium,
44
48
  color: tokens.colors.textSecondary,
45
49
  textAlign: "center",
50
+ marginBottom: onAction ? tokens.spacing.xl : 0,
51
+ },
52
+ button: {
53
+ minWidth: 160,
46
54
  },
47
55
  }),
48
- [tokens],
56
+ [tokens, onAction],
49
57
  );
50
58
 
51
59
  return (
@@ -53,6 +61,14 @@ export function EmptyState({
53
61
  <AtomicText style={styles.icon}>{icon}</AtomicText>
54
62
  <AtomicText style={styles.title}>{title}</AtomicText>
55
63
  <AtomicText style={styles.description}>{description}</AtomicText>
64
+ {onAction && actionLabel && (
65
+ <AtomicButton
66
+ title={actionLabel}
67
+ onPress={onAction}
68
+ variant="primary"
69
+ style={styles.button}
70
+ />
71
+ )}
56
72
  </View>
57
73
  );
58
74
  }
@@ -31,6 +31,8 @@ interface CreationsGalleryScreenProps {
31
31
  readonly t: (key: string) => string;
32
32
  readonly enableEditing?: boolean;
33
33
  readonly onImageEdit?: (uri: string, creationId: string) => void | Promise<void>;
34
+ readonly onEmptyAction?: () => void;
35
+ readonly emptyActionLabel?: string;
34
36
  }
35
37
 
36
38
  export function CreationsGalleryScreen({
@@ -40,6 +42,8 @@ export function CreationsGalleryScreen({
40
42
  t,
41
43
  enableEditing = false,
42
44
  onImageEdit,
45
+ onEmptyAction,
46
+ emptyActionLabel,
43
47
  }: CreationsGalleryScreenProps) {
44
48
  const tokens = useAppDesignTokens();
45
49
  const insets = useSafeAreaInsets();
@@ -183,6 +187,8 @@ export function CreationsGalleryScreen({
183
187
  <EmptyState
184
188
  title={t(config.translations.empty)}
185
189
  description={t(config.translations.emptyDescription)}
190
+ actionLabel={emptyActionLabel}
191
+ onAction={onEmptyAction}
186
192
  />
187
193
  </View>
188
194
  );