1
1
import * as React from 'react' ;
2
2
import {
3
3
Animated ,
4
+ ColorValue ,
4
5
GestureResponderEvent ,
5
6
StyleProp ,
6
7
StyleSheet ,
@@ -38,6 +39,7 @@ export type Props = {
38
39
* - `toggleStackOnLongPress`: callback that is called when `FAB` is long pressed
39
40
* - `size`: size of action item. Defaults to `small`. @supported Available in v5.x
40
41
* - `testID`: testID to be used on tests
42
+ * - `rippleColor`: color of the ripple effect.
41
43
*/
42
44
actions : Array < {
43
45
icon : IconSource ;
@@ -52,6 +54,7 @@ export type Props = {
52
54
onPress : ( e : GestureResponderEvent ) => void ;
53
55
size ?: 'small' | 'medium' ;
54
56
testID ?: string ;
57
+ rippleColor ?: ColorValue ;
55
58
} > ;
56
59
/**
57
60
* Icon to display for the `FAB`.
@@ -70,6 +73,10 @@ export type Props = {
70
73
* Custom backdrop color for opened speed dial background.
71
74
*/
72
75
backdropColor ?: string ;
76
+ /**
77
+ * Color of the ripple effect.
78
+ */
79
+ rippleColor ?: ColorValue ;
73
80
/**
74
81
* Function to execute on pressing the `FAB`.
75
82
*/
@@ -208,6 +215,7 @@ const FABGroup = ({
208
215
variant = 'primary' ,
209
216
enableLongPressWhenStackOpened = false ,
210
217
backdropColor : customBackdropColor ,
218
+ rippleColor,
211
219
} : Props ) => {
212
220
const theme = useInternalTheme ( themeOverrides ) ;
213
221
const { current : backdrop } = React . useRef < Animated . Value > (
@@ -426,6 +434,7 @@ const FABGroup = ({
426
434
accessibilityRole = "button"
427
435
testID = { it . testID }
428
436
visible = { open }
437
+ rippleColor = { it . rippleColor }
429
438
/>
430
439
</ View >
431
440
) ;
@@ -457,6 +466,7 @@ const FABGroup = ({
457
466
label = { label }
458
467
testID = { testID }
459
468
variant = { variant }
469
+ rippleColor = { rippleColor }
460
470
/>
461
471
</ View >
462
472
</ View >
0 commit comments