@umituz/react-native-ai-generation-content 1.17.39 → 1.17.40
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
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VideoTypeSelector Component
|
|
3
|
+
* Horizontal scroll selector for different video types with emojis.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { View, ScrollView, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
|
+
import {
|
|
9
|
+
AtomicText,
|
|
10
|
+
useAppDesignTokens,
|
|
11
|
+
} from "@umituz/react-native-design-system";
|
|
12
|
+
|
|
13
|
+
export interface VideoTypeOption {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly emoji: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface VideoTypeSelectorProps {
|
|
20
|
+
readonly selectedType: string;
|
|
21
|
+
readonly onSelectType: (typeId: string) => void;
|
|
22
|
+
readonly types: readonly VideoTypeOption[];
|
|
23
|
+
readonly title?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const VideoTypeSelector: React.FC<VideoTypeSelectorProps> = ({
|
|
27
|
+
selectedType,
|
|
28
|
+
onSelectType,
|
|
29
|
+
types,
|
|
30
|
+
title = "Video Type",
|
|
31
|
+
}) => {
|
|
32
|
+
const tokens = useAppDesignTokens();
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<View style={styles.section}>
|
|
36
|
+
<AtomicText
|
|
37
|
+
type="bodyMedium"
|
|
38
|
+
style={[styles.title, { color: tokens.colors.textPrimary }]}
|
|
39
|
+
>
|
|
40
|
+
{title}
|
|
41
|
+
</AtomicText>
|
|
42
|
+
<ScrollView
|
|
43
|
+
horizontal
|
|
44
|
+
showsHorizontalScrollIndicator={false}
|
|
45
|
+
contentContainerStyle={styles.scrollContent}
|
|
46
|
+
>
|
|
47
|
+
{types.map((type) => (
|
|
48
|
+
<TouchableOpacity
|
|
49
|
+
key={type.id}
|
|
50
|
+
style={[
|
|
51
|
+
styles.card,
|
|
52
|
+
{
|
|
53
|
+
backgroundColor:
|
|
54
|
+
selectedType === type.id
|
|
55
|
+
? tokens.colors.primary
|
|
56
|
+
: tokens.colors.surface,
|
|
57
|
+
borderColor:
|
|
58
|
+
selectedType === type.id
|
|
59
|
+
? tokens.colors.primary
|
|
60
|
+
: tokens.colors.borderLight,
|
|
61
|
+
},
|
|
62
|
+
]}
|
|
63
|
+
onPress={() => onSelectType(type.id)}
|
|
64
|
+
>
|
|
65
|
+
<AtomicText type="headlineLarge">{type.emoji}</AtomicText>
|
|
66
|
+
<AtomicText
|
|
67
|
+
type="bodySmall"
|
|
68
|
+
style={{
|
|
69
|
+
color:
|
|
70
|
+
selectedType === type.id
|
|
71
|
+
? "#FFFFFF"
|
|
72
|
+
: tokens.colors.textPrimary,
|
|
73
|
+
fontWeight: selectedType === type.id ? "600" : "400",
|
|
74
|
+
marginTop: 8,
|
|
75
|
+
textAlign: "center",
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
{type.name}
|
|
79
|
+
</AtomicText>
|
|
80
|
+
</TouchableOpacity>
|
|
81
|
+
))}
|
|
82
|
+
</ScrollView>
|
|
83
|
+
</View>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const styles = StyleSheet.create({
|
|
88
|
+
section: {
|
|
89
|
+
padding: 16,
|
|
90
|
+
width: "100%",
|
|
91
|
+
},
|
|
92
|
+
title: {
|
|
93
|
+
fontWeight: "600",
|
|
94
|
+
marginBottom: 12,
|
|
95
|
+
},
|
|
96
|
+
scrollContent: {
|
|
97
|
+
paddingRight: 16,
|
|
98
|
+
},
|
|
99
|
+
card: {
|
|
100
|
+
width: 100,
|
|
101
|
+
padding: 16,
|
|
102
|
+
borderRadius: 16,
|
|
103
|
+
borderWidth: 2,
|
|
104
|
+
marginRight: 12,
|
|
105
|
+
alignItems: "center",
|
|
106
|
+
},
|
|
107
|
+
});
|