@dhiraj0720/report1chart 2.9.6 → 2.9.7
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
|
@@ -3,20 +3,32 @@ import { ScrollView, TouchableOpacity, Text, StyleSheet } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
const MonthSelector = ({ months, selected, onSelect }) => (
|
|
5
5
|
<ScrollView horizontal showsHorizontalScrollIndicator={false} style={styles.row}>
|
|
6
|
+
{/* SELECT ALL */}
|
|
6
7
|
<TouchableOpacity
|
|
7
8
|
style={[styles.btn, selected === 'ALL' && styles.active]}
|
|
8
9
|
onPress={() => onSelect('ALL')}
|
|
9
10
|
>
|
|
10
|
-
<Text style={
|
|
11
|
+
<Text style={[
|
|
12
|
+
styles.text,
|
|
13
|
+
selected === 'ALL' && styles.activeText // ← This was missing!
|
|
14
|
+
]}>
|
|
15
|
+
Select all
|
|
16
|
+
</Text>
|
|
11
17
|
</TouchableOpacity>
|
|
12
18
|
|
|
19
|
+
{/* MONTHS */}
|
|
13
20
|
{months.map(m => (
|
|
14
21
|
<TouchableOpacity
|
|
15
22
|
key={m}
|
|
16
23
|
style={[styles.btn, selected === m && styles.active]}
|
|
17
24
|
onPress={() => onSelect(m)}
|
|
18
25
|
>
|
|
19
|
-
<Text style={
|
|
26
|
+
<Text style={[
|
|
27
|
+
styles.text,
|
|
28
|
+
selected === m && styles.activeText // ← This was missing!
|
|
29
|
+
]}>
|
|
30
|
+
{m}
|
|
31
|
+
</Text>
|
|
20
32
|
</TouchableOpacity>
|
|
21
33
|
))}
|
|
22
34
|
</ScrollView>
|
|
@@ -33,7 +45,16 @@ const styles = StyleSheet.create({
|
|
|
33
45
|
backgroundColor: '#eef2f7',
|
|
34
46
|
marginRight: 8,
|
|
35
47
|
},
|
|
36
|
-
active: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
active: {
|
|
49
|
+
backgroundColor: '#0f172a' // Dark background when active
|
|
50
|
+
},
|
|
51
|
+
text: {
|
|
52
|
+
color: '#000',
|
|
53
|
+
fontWeight: '600',
|
|
54
|
+
fontSize: 14,
|
|
55
|
+
},
|
|
56
|
+
activeText: {
|
|
57
|
+
color: '#fff', // White text when active
|
|
58
|
+
fontWeight: '700'
|
|
59
|
+
},
|
|
60
|
+
});
|