-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
Current behaviour
The IconButton component TouchableRipple borderRadius is calculated based on the icon size and the button padding.
react-native-paper/src/components/IconButton/IconButton.tsx
Lines 150 to 155 in 8e5d12d
| const buttonSize = isV3 ? size + 2 * PADDING : size * 1.5; | |
| const { | |
| borderWidth = isV3 && mode === 'outlined' && !selected ? 1 : 0, | |
| borderRadius = buttonSize / 2, | |
| } = (StyleSheet.flatten(style) || {}) as ViewStyle; |
| style={[styles.touchable, { borderRadius }]} |
Expected behaviour
The borderRadius for the TouchableRipple should match the borderRadius set for the button in styles and fill the button surface
How to reproduce?
https://snack.expo.dev/@jahirfiquitiva/rnp-iconbutton-ripple
Preview
Alternative solution
Add a prop to customize the TouchableRipple borderRadius.
NickCGeismar
