diff --git a/packages/drawer/src/views/TouchableItem.ios.tsx b/packages/drawer/src/views/TouchableItem.ios.tsx index dfa0f029..22b3d9f6 100644 --- a/packages/drawer/src/views/TouchableItem.ios.tsx +++ b/packages/drawer/src/views/TouchableItem.ios.tsx @@ -10,27 +10,26 @@ type Props = React.ComponentProps & { const useNativeDriver = Platform.OS !== 'web'; -export default class BorderlessButton extends React.Component { +export default class TouchableItem extends React.Component { static defaultProps = { activeOpacity: 0.3, borderless: true, + enabled: true, }; private opacity = new Animated.Value(1); private handleActiveStateChange = (active: boolean) => { - if (Platform.OS !== 'android') { - Animated.spring(this.opacity, { - stiffness: 1000, - damping: 500, - mass: 3, - overshootClamping: true, - restDisplacementThreshold: 0.01, - restSpeedThreshold: 0.01, - toValue: active ? this.props.activeOpacity : 1, - useNativeDriver, - }).start(); - } + Animated.spring(this.opacity, { + stiffness: 1000, + damping: 500, + mass: 3, + overshootClamping: true, + restDisplacementThreshold: 0.01, + restSpeedThreshold: 0.01, + toValue: active ? this.props.activeOpacity : 1, + useNativeDriver, + }).start(); this.props.onActiveStateChange?.(active); }; @@ -43,10 +42,7 @@ export default class BorderlessButton extends React.Component { {children} diff --git a/packages/stack/src/views/TouchableItem.ios.tsx b/packages/stack/src/views/TouchableItem.ios.tsx index dfa0f029..22b3d9f6 100644 --- a/packages/stack/src/views/TouchableItem.ios.tsx +++ b/packages/stack/src/views/TouchableItem.ios.tsx @@ -10,27 +10,26 @@ type Props = React.ComponentProps & { const useNativeDriver = Platform.OS !== 'web'; -export default class BorderlessButton extends React.Component { +export default class TouchableItem extends React.Component { static defaultProps = { activeOpacity: 0.3, borderless: true, + enabled: true, }; private opacity = new Animated.Value(1); private handleActiveStateChange = (active: boolean) => { - if (Platform.OS !== 'android') { - Animated.spring(this.opacity, { - stiffness: 1000, - damping: 500, - mass: 3, - overshootClamping: true, - restDisplacementThreshold: 0.01, - restSpeedThreshold: 0.01, - toValue: active ? this.props.activeOpacity : 1, - useNativeDriver, - }).start(); - } + Animated.spring(this.opacity, { + stiffness: 1000, + damping: 500, + mass: 3, + overshootClamping: true, + restDisplacementThreshold: 0.01, + restSpeedThreshold: 0.01, + toValue: active ? this.props.activeOpacity : 1, + useNativeDriver, + }).start(); this.props.onActiveStateChange?.(active); }; @@ -43,10 +42,7 @@ export default class BorderlessButton extends React.Component { {children}