11import { Easing } from 'react-native-reanimated' ;
22
3+ /**
4+ * Configuration values for pressable visual feedback
5+ */
36export type PressableConfig = {
7+ /**
8+ * Target opacity when the pressable is in active/pressed state.
9+ *
10+ * Used by PressableOpacity to interpolate from 1 (idle) to this value (pressed).
11+ *
12+ * @default 0.5
13+ * @example
14+ * // More transparent when pressed
15+ * config={{ activeOpacity: 0.3 }}
16+ *
17+ * // Less transparent when pressed
18+ * config={{ activeOpacity: 0.7 }}
19+ */
420 activeOpacity : number ;
21+
22+ /**
23+ * Target scale when the pressable is in active/pressed state.
24+ *
25+ * Used by PressableScale to interpolate from baseScale (idle) to this value (pressed).
26+ * Values less than baseScale create a "shrink" effect.
27+ *
28+ * @default 0.96
29+ * @example
30+ * // More pronounced shrink effect
31+ * config={{ minScale: 0.9 }}
32+ *
33+ * // Subtle shrink effect
34+ * config={{ minScale: 0.98 }}
35+ */
536 minScale : number ;
6- maxScale : number ;
37+
38+ /**
39+ * Base scale when the pressable is in idle/unpressed state.
40+ *
41+ * Used by PressableScale as the starting scale value.
42+ * Typically set to 1, but can be adjusted for special effects.
43+ *
44+ * @default 1
45+ * @example
46+ * // Normal size when idle
47+ * config={{ baseScale: 1 }}
48+ *
49+ * // Slightly enlarged when idle (grows when pressed if minScale > 1)
50+ * config={{ baseScale: 1.05, minScale: 1.1 }}
51+ */
52+ baseScale : number ;
753} ;
854
955export const DefaultAnimationConfigs = {
@@ -15,8 +61,11 @@ export const DefaultAnimationConfigs = {
1561 } ,
1662} as const ;
1763
64+ /**
65+ * Default configuration values for pressable visual feedback
66+ */
1867export const DefaultPressableConfig : PressableConfig = {
1968 activeOpacity : 0.5 ,
2069 minScale : 0.96 ,
21- maxScale : 1 ,
70+ baseScale : 1 ,
2271} as const ;
0 commit comments