Skip to content

Commit

Permalink
feat: allow usage of custom border radius for animated fab
Browse files Browse the repository at this point in the history
  • Loading branch information
babucarr32 committed Jan 1, 2025
1 parent edfef1c commit b2ec24a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/FAB/AnimatedFAB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ const AnimatedFAB = ({
scale: visibility,
},
],
borderRadius,
borderRadius: restStyle?.borderRadius || borderRadius,
},
!isV3 && {
elevation: md2Elevation,
Expand All @@ -375,7 +375,7 @@ const AnimatedFAB = ({
],
},
styles.standard,
{ borderRadius },
{ borderRadius: restStyle?.borderRadius || borderRadius },
]}
>
<View style={[StyleSheet.absoluteFill, styles.shadowWrapper]}>
Expand All @@ -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`}
Expand All @@ -408,7 +408,8 @@ const AnimatedFAB = ({
inputRange: propForDirection([distance, 0]),
outputRange: propForDirection([
SIZE / (extendedWidth / SIZE),
borderRadius,
(restStyle?.borderRadius as number | undefined) ||
borderRadius,
]),
}),
},
Expand Down Expand Up @@ -447,7 +448,7 @@ const AnimatedFAB = ({
accessibilityRole="button"
accessibilityState={newAccessibilityState}
testID={testID}
style={{ borderRadius }}
style={{ borderRadius: restStyle?.borderRadius || borderRadius }}
theme={theme}
>
<View
Expand Down

0 comments on commit b2ec24a

Please sign in to comment.