Skip to content

Commit

Permalink
chore: replace native slider with js slider
Browse files Browse the repository at this point in the history
  • Loading branch information
WadhahEssam committed Oct 15, 2024
1 parent aac0178 commit b608b12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
12 changes: 6 additions & 6 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Slider from '@react-native-community/slider';

import * as React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { StyleSheet, View } from 'react-native';
import AnimateableText from 'react-native-animateable-text';
import { useAnimatedProps, useSharedValue } from 'react-native-reanimated';
import {Slider} from '@miblanchard/react-native-slider';

const style = {
fontSize: 30,
Expand Down Expand Up @@ -40,7 +41,9 @@ export default function App() {
return (
<View style={styles.container}>
<Slider
style={{ width: '80%', height: 40 }}
containerStyle={{
width: '80%',
}}
minimumValue={0}
step={1}
maximumValue={10000}
Expand All @@ -52,9 +55,6 @@ export default function App() {
}}
/>
<AnimateableText selectable style={style} animatedProps={animatedProps} />

<View style={{height: 100, width: 100, backgroundColor: 'red'}}></View>
<AnimateableText numberOfLines={1} style={{ height: 100, width: 100, backgroundColor: 'yellow', fontWeight: '900'}} text='rest asdfasdf asdfasd fassdfasdf asdfasd' />
</View>
);
}
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"generatecpp": "node node_modules/react-native/scripts/generate-codegen-artifacts.js -p ../ -o ../gcpp -t all"
},
"dependencies": {
"@react-native-community/slider": "^4.5.3",
"@miblanchard/react-native-slider": "^2.6.0",
"expo": "51.0.32",
"expo-build-properties": "~0.12.5",
"expo-dev-client": "~4.0.23",
Expand Down
5 changes: 5 additions & 0 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,11 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"

"@miblanchard/react-native-slider@^2.6.0":
version "2.6.0"
resolved "https://registry.yarnpkg.com/@miblanchard/react-native-slider/-/react-native-slider-2.6.0.tgz#9f78c805d637ffaff0e3e7429932d2995a67edc9"
integrity sha512-o7hk/f/8vkqh6QNR5L52m+ws846fQeD/qNCC9CCSRdBqjq66KiCgbxzlhRzKM/gbtxcvMYMIEEJ1yes5cr6I3A==

"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
Expand Down

0 comments on commit b608b12

Please sign in to comment.