cdslibrary 1.2.34 → 1.2.35
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/CDSSwitch.jsx +8 -11
- package/package.json +1 -1
package/components/CDSSwitch.jsx
CHANGED
|
@@ -9,7 +9,7 @@ export const CDSSwitch = ({ label, onValueChange, value }) => {
|
|
|
9
9
|
<View style={[styles.container, { marginVertical: theme.space.xs }]}>
|
|
10
10
|
{label && (
|
|
11
11
|
<Text style={[
|
|
12
|
-
theme.typography.label,
|
|
12
|
+
theme.typography.label,
|
|
13
13
|
{ color: theme.text.neutral.primary, flex: 1, marginRight: theme.space.sm }
|
|
14
14
|
]}>
|
|
15
15
|
{label}
|
|
@@ -19,18 +19,15 @@ export const CDSSwitch = ({ label, onValueChange, value }) => {
|
|
|
19
19
|
value={value}
|
|
20
20
|
onValueChange={onValueChange}
|
|
21
21
|
// Colores dinámicos basados en tu tema
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
? undefined // En iOS es mejor dejar el blanco nativo
|
|
29
|
-
: theme.surface.neutral.primary
|
|
22
|
+
rackColor={{ false: theme.surface.neutral.tertiaryVariant, true: theme.surface.special.progress }}
|
|
23
|
+
activeThumbColor={theme.surface.neutral.primary}
|
|
24
|
+
thumbColor={
|
|
25
|
+
useAverage
|
|
26
|
+
? theme.surface.neutral.primary
|
|
27
|
+
: theme.surface.neutral.primary
|
|
30
28
|
}
|
|
31
|
-
// Color de fondo para Android cuando está apagado
|
|
32
|
-
ios_backgroundColor={theme.outline.neutral.primary}
|
|
33
29
|
/>
|
|
30
|
+
|
|
34
31
|
</View>
|
|
35
32
|
);
|
|
36
33
|
}
|