From edfef1c6a65d965ba4cbb0e360f4568aea7810a4 Mon Sep 17 00:00:00 2001 From: babucarr32 Date: Wed, 1 Jan 2025 20:31:14 +0000 Subject: [PATCH 1/2] feat: allow usage of custom border radius for animated fab --- src/components/FAB/AnimatedFAB.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/FAB/AnimatedFAB.tsx b/src/components/FAB/AnimatedFAB.tsx index c66038d925..8fe3da558c 100644 --- a/src/components/FAB/AnimatedFAB.tsx +++ b/src/components/FAB/AnimatedFAB.tsx @@ -419,7 +419,10 @@ const AnimatedFAB = ({ Date: Wed, 1 Jan 2025 21:55:13 +0000 Subject: [PATCH 2/2] feat: allow usage of custom border radius for animated fab --- src/components/FAB/AnimatedFAB.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/FAB/AnimatedFAB.tsx b/src/components/FAB/AnimatedFAB.tsx index 8fe3da558c..c7452df02a 100644 --- a/src/components/FAB/AnimatedFAB.tsx +++ b/src/components/FAB/AnimatedFAB.tsx @@ -351,7 +351,7 @@ const AnimatedFAB = ({ scale: visibility, }, ], - borderRadius, + borderRadius: restStyle?.borderRadius || borderRadius, }, !isV3 && { elevation: md2Elevation, @@ -375,7 +375,7 @@ const AnimatedFAB = ({ ], }, styles.standard, - { borderRadius }, + { borderRadius: restStyle?.borderRadius || borderRadius }, ]} > @@ -389,7 +389,7 @@ const AnimatedFAB = ({ inputRange: propForDirection([distance, 0.9 * distance, 0]), outputRange: propForDirection([1, 0.15, 0]), }), - borderRadius, + borderRadius: restStyle?.borderRadius || borderRadius, }, ]} testID={`${testID}-extended-shadow`} @@ -408,7 +408,8 @@ const AnimatedFAB = ({ inputRange: propForDirection([distance, 0]), outputRange: propForDirection([ SIZE / (extendedWidth / SIZE), - borderRadius, + (restStyle?.borderRadius as number | undefined) || + borderRadius, ]), }), }, @@ -447,7 +448,7 @@ const AnimatedFAB = ({ accessibilityRole="button" accessibilityState={newAccessibilityState} testID={testID} - style={{ borderRadius }} + style={{ borderRadius: restStyle?.borderRadius || borderRadius }} theme={theme} >