cdslibrary 1.2.98 → 1.2.99
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/components/CDSNavBar.jsx
CHANGED
|
@@ -10,9 +10,10 @@ export const CDSNavBar = ({
|
|
|
10
10
|
title,
|
|
11
11
|
hasBack,
|
|
12
12
|
}) => {
|
|
13
|
-
const { theme, isDarkMode } = useTheme();
|
|
13
|
+
const { theme, isDarkMode, } = useTheme();
|
|
14
14
|
const navigation = useNavigation();
|
|
15
|
-
|
|
15
|
+
const isMobile = theme.isMobile;
|
|
16
|
+
|
|
16
17
|
const handleBackPress = () => {
|
|
17
18
|
if (hasBack) navigation.goBack();
|
|
18
19
|
};
|
|
@@ -23,6 +24,7 @@ export const CDSNavBar = ({
|
|
|
23
24
|
|
|
24
25
|
return (
|
|
25
26
|
<View style={[styles.container, {
|
|
27
|
+
height: isMobile? 56 : 80,
|
|
26
28
|
backgroundColor: theme.surface.neutral.primary,
|
|
27
29
|
borderBottomColor: theme.outline.neutral.primary // Usando tu variable de tema
|
|
28
30
|
}]}>
|
package/components/CDSSelect.jsx
CHANGED
|
@@ -13,6 +13,8 @@ export const CDSSelect = ({ label, options = [], onSelect, selectedValue = null,
|
|
|
13
13
|
options.find(opt => opt.value === selectedValue) || null
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
+
const isMobile = theme.isMobile
|
|
17
|
+
|
|
16
18
|
// Altura fija por cada fila (puedes ajustarla según tu diseño)
|
|
17
19
|
const ITEM_HEIGHT = 48;
|
|
18
20
|
// Mostramos 7.5 opciones para que la última se vea cortada y sugiera scroll
|
|
@@ -30,6 +32,8 @@ export const CDSSelect = ({ label, options = [], onSelect, selectedValue = null,
|
|
|
30
32
|
if (onSelect) onSelect(item.value);
|
|
31
33
|
};
|
|
32
34
|
|
|
35
|
+
|
|
36
|
+
console.log(isMobile)
|
|
33
37
|
return (
|
|
34
38
|
<View style={styles.mainContainer}>
|
|
35
39
|
{label && (
|
|
@@ -76,7 +80,7 @@ export const CDSSelect = ({ label, options = [], onSelect, selectedValue = null,
|
|
|
76
80
|
boxShadow: theme.shadows.lg,
|
|
77
81
|
backgroundColor: theme.surface.neutral.primary,
|
|
78
82
|
borderRadius: theme.radius.md,
|
|
79
|
-
maxHeight: MAX_HEIGHT +
|
|
83
|
+
maxHeight: isMobile ? MAX_HEIGHT + (ITEM_HEIGHT / 5) : MAX_HEIGHT + (ITEM_HEIGHT / 1.5)
|
|
80
84
|
}
|
|
81
85
|
]}>
|
|
82
86
|
{/* Header del Modal */}
|