mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
* Adds types for react-native-side-menu * Prettier * Fixes tests * Update types/react-native-side-menu/index.d.ts with project URL Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com> * Adds default values * Removes incorrect 2nd parameter of onStartShouldSetResponderCapture * Adds typing to onAnimationComplete Co-authored-by: Matt Pawley <matt.pawley@smart-buildings.co.uk> Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>
35 lines
978 B
TypeScript
35 lines
978 B
TypeScript
import * as React from 'react';
|
|
import { View, Animated } from 'react-native';
|
|
import ReactNativeSideMenu from 'react-native-side-menu';
|
|
|
|
export default () => (
|
|
<ReactNativeSideMenu
|
|
menu={<View />}
|
|
isOpen={false}
|
|
openMenuOffset={100}
|
|
hiddenMenuOffset={100}
|
|
edgeHitWidth={100}
|
|
toleranceX={100}
|
|
toleranceY={100}
|
|
disableGestures={false}
|
|
onStartShouldSetResponderCapture={() => false}
|
|
onChange={() => {}}
|
|
onMove={() => {}}
|
|
onSliding={() => {}}
|
|
menuPosition="left"
|
|
animationFunction={(prop, value) =>
|
|
Animated.spring(prop, {
|
|
useNativeDriver: false,
|
|
toValue: value,
|
|
friction: 8,
|
|
})
|
|
}
|
|
animationStyle={() => ({
|
|
transform: [{ translateX: 40 }],
|
|
})}
|
|
onAnimationComplete={() => {}}
|
|
bounceBackOnOverdraw={false}
|
|
autoClosing={false}
|
|
/>
|
|
);
|