Skip to content

Commit

Permalink
Revert "fix: Add support for borderRadii on RectButton (#2691)"
Browse files Browse the repository at this point in the history
This reverts commit 74c01a3.
  • Loading branch information
j-piasecki committed Feb 5, 2024
1 parent c0b6f71 commit ac09431
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 326 deletions.
2 changes: 0 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import ContextMenu from './release_tests/contextMenu';
import NestedTouchables from './release_tests/nestedTouchables';
import NestedButtons from './release_tests/nestedButtons';
import NestedGestureHandlerRootViewWithModal from './release_tests/nestedGHRootViewWithModal';
import RoundedButtons from './release_tests/roundedButtons';
import { PinchableBox } from './recipes/scaleAndRotate';
import PanAndScroll from './recipes/panAndScroll';
import { BottomSheet } from './showcase/bottomSheet';
Expand Down Expand Up @@ -120,7 +119,6 @@ const EXAMPLES: ExamplesSection[] = [
{ name: 'Touchables', component: TouchablesIndex as React.ComponentType },
{ name: 'MouseButtons', component: MouseButtons },
{ name: 'ContextMenu (web only)', component: ContextMenu },
{ name: 'Rounded buttons', component: RoundedButtons },
],
},
{
Expand Down
138 changes: 0 additions & 138 deletions example/src/release_tests/roundedButtons/index.tsx

This file was deleted.

25 changes: 8 additions & 17 deletions src/components/GestureButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
StyleSheet,
StyleProp,
ViewStyle,
View,
} from 'react-native';

import createNativeWrapper from '../handlers/createNativeWrapper';
Expand All @@ -21,7 +20,6 @@ import {
NativeViewGestureHandlerPayload,
NativeViewGestureHandlerProps,
} from '../handlers/NativeViewGestureHandler';
import { splitStyleProp } from './splitStyleProp';

export interface RawButtonProps extends NativeViewGestureHandlerProps {
/**
Expand Down Expand Up @@ -65,7 +63,6 @@ export interface RawButtonProps extends NativeViewGestureHandlerProps {
* Set this to true if you don't want the system to play sound when the button is pressed.
*/
touchSoundDisabled?: boolean;
style?: StyleProp<ViewStyle>;
}

export interface BaseButtonProps extends RawButtonProps {
Expand All @@ -87,6 +84,7 @@ export interface BaseButtonProps extends RawButtonProps {
* method.
*/
onActiveStateChange?: (active: boolean) => void;
style?: StyleProp<ViewStyle>;
testID?: string;

/**
Expand Down Expand Up @@ -220,22 +218,15 @@ export class BaseButton extends React.Component<BaseButtonProps> {
};

render() {
const { rippleColor, style, ...rest } = this.props;

const { outerStyles, innerStyles, restStyles } = splitStyleProp(style);
const { rippleColor, ...rest } = this.props;

return (
<View style={outerStyles}>
<View style={innerStyles}>
<RawButton
rippleColor={processColor(rippleColor)}
style={restStyles}
{...rest}
onGestureEvent={this.onGestureEvent}
onHandlerStateChange={this.onHandlerStateChange}
/>
</View>
</View>
<RawButton
rippleColor={processColor(rippleColor)}
{...rest}
onGestureEvent={this.onGestureEvent}
onHandlerStateChange={this.onHandlerStateChange}
/>
);
}
}
Expand Down
169 changes: 0 additions & 169 deletions src/components/splitStyleProp.ts

This file was deleted.

0 comments on commit ac09431

Please sign in to comment.