@umituz/react-native-ai-creations 1.4.1 → 1.4.2
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
|
@@ -14,6 +14,8 @@ interface CreationsGridProps {
|
|
|
14
14
|
readonly onShare: (creation: Creation) => void;
|
|
15
15
|
readonly onDelete: (creation: Creation) => void;
|
|
16
16
|
readonly contentContainerStyle?: any;
|
|
17
|
+
readonly ListEmptyComponent?: React.ReactElement | null;
|
|
18
|
+
readonly ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export const CreationsGrid: React.FC<CreationsGridProps> = ({
|
|
@@ -25,6 +27,8 @@ export const CreationsGrid: React.FC<CreationsGridProps> = ({
|
|
|
25
27
|
onShare,
|
|
26
28
|
onDelete,
|
|
27
29
|
contentContainerStyle,
|
|
30
|
+
ListEmptyComponent,
|
|
31
|
+
ListHeaderComponent,
|
|
28
32
|
}) => {
|
|
29
33
|
const tokens = useAppDesignTokens();
|
|
30
34
|
const styles = useStyles(tokens);
|
|
@@ -44,7 +48,13 @@ export const CreationsGrid: React.FC<CreationsGridProps> = ({
|
|
|
44
48
|
data={creations}
|
|
45
49
|
renderItem={renderItem}
|
|
46
50
|
keyExtractor={(item) => item.id}
|
|
47
|
-
|
|
51
|
+
ListHeaderComponent={ListHeaderComponent}
|
|
52
|
+
ListEmptyComponent={ListEmptyComponent}
|
|
53
|
+
contentContainerStyle={[
|
|
54
|
+
styles.list,
|
|
55
|
+
contentContainerStyle,
|
|
56
|
+
(!creations || creations.length === 0) && { flexGrow: 1 }
|
|
57
|
+
]}
|
|
48
58
|
showsVerticalScrollIndicator={false}
|
|
49
59
|
refreshControl={
|
|
50
60
|
<RefreshControl
|