diff --git a/example/src/App.tsx b/example/src/App.tsx index 4716c22..e6747f5 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,14 +1,12 @@ import * as React from 'react'; import { StyleSheet, View } from 'react-native'; - -import { GestureHandlerRootView } from 'react-native-gesture-handler'; import { Rheostat } from '@one-am/react-native-rheostat-slider'; const mockValues = Array.from(new Array(28)).map((_, index) => index); export default function App() { return ( - + console.log(state)} /> - + ); } diff --git a/src/components/rheostat/index.tsx b/src/components/rheostat/index.tsx index d0d3d64..d998144 100644 --- a/src/components/rheostat/index.tsx +++ b/src/components/rheostat/index.tsx @@ -4,6 +4,7 @@ import { type LayoutChangeEvent, View } from 'react-native'; import type { RheostatProps } from './types'; import SingleRheostat from './single'; import DoubleRheostat from './double'; +import { GestureHandlerRootView } from 'react-native-gesture-handler'; type RheostatImplProps = Omit & { double?: boolean; @@ -71,27 +72,29 @@ function RheostatImpl({ }, [data, max, min, step, unlimitedBottomBound, unlimitedUpperBound]); return ( - - {layout.width > 0 ? ( - double ? ( - - ) : ( - - ) - ) : null} - + + + {layout.width > 0 ? ( + double ? ( + + ) : ( + + ) + ) : null} + + ); }