Skip to content

Commit 508dc2d

Browse files
committed
Fix borderless ripple
1 parent 0ec1cd2 commit 508dc2d

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

packages/react-native-gesture-handler/src/components/GestureHandlerButton.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ export interface ButtonProps extends ViewProps, AccessibilityProps {
104104
export const ButtonComponent =
105105
RNGestureHandlerButtonNativeComponent as HostComponent<ButtonProps>;
106106

107-
export default function GestureHandlerButton({ style, ...rest }: ButtonProps) {
107+
export default function GestureHandlerButton({
108+
borderless,
109+
style,
110+
...rest
111+
}: ButtonProps) {
108112
const flattenedStyle = useMemo(() => StyleSheet.flatten(style), [style]);
109113

110114
const {
@@ -222,10 +226,16 @@ export default function GestureHandlerButton({ style, ...rest }: ButtonProps) {
222226
collapsable={false}
223227
style={[
224228
styles.contents,
225-
(!overflow || overflow === 'hidden') && styles.overflowHidden,
229+
!borderless &&
230+
(!overflow || overflow === 'hidden') &&
231+
styles.overflowHidden,
226232
restStyle,
227233
]}>
228-
<ButtonComponent {...rest} style={layoutStyle} />
234+
<ButtonComponent
235+
{...rest}
236+
style={layoutStyle}
237+
borderless={borderless}
238+
/>
229239
</View>
230240
</RNGestureHandlerButtonWrapperNativeComponent>
231241
);

0 commit comments

Comments
 (0)