diff --git a/README.md b/README.md index 2df4fc3..536d09b 100644 --- a/README.md +++ b/README.md @@ -112,13 +112,9 @@ Checkout TreeSelect Example [here](./example/src/App.tsx) ```jsx import React from 'react'; -import { - TreeDataTypes, - TreeSelect, -} from 'react-native-tree-selection'; +import { TreeDataTypes, TreeSelect } from 'react-native-tree-selection'; const App = () => { - return ( { onChildPress={onChildPress} onCheckBoxPress={onCheckBoxPress} /> - /> ); }; diff --git a/assets/Tree-Selection.gif b/assets/Tree-Selection.gif index 194bb2f..857b6fc 100644 Binary files a/assets/Tree-Selection.gif and b/assets/Tree-Selection.gif differ diff --git a/example/src/theme/applicationStyles.ts b/example/src/theme/applicationStyles.ts index 0b757f0..3e1a2dd 100644 --- a/example/src/theme/applicationStyles.ts +++ b/example/src/theme/applicationStyles.ts @@ -4,9 +4,6 @@ import { moderateScale, verticalScale } from './Metrics'; const styles = StyleSheet.create({ container: { flex: 1, - margin: moderateScale(20), - marginBottom: verticalScale(10), - alignItems: 'flex-start', }, text: { marginTop: verticalScale(50), diff --git a/package.json b/package.json index 570171f..a8d68cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-tree-selection", - "version": "1.0.0", + "version": "1.0.1", "description": "A high-performance and lightweight tree selection library for React Native.", "main": "lib/index", "types": "lib/index.d.ts", diff --git a/src/components/TreeSelection/TreeSelect.tsx b/src/components/TreeSelection/TreeSelect.tsx index 72a8ce3..873a176 100644 --- a/src/components/TreeSelection/TreeSelect.tsx +++ b/src/components/TreeSelection/TreeSelect.tsx @@ -249,6 +249,7 @@ const TreeSelect = ({ index.toString()} diff --git a/src/components/TreeSelection/styles.ts b/src/components/TreeSelection/styles.ts index f443917..e2ef98e 100644 --- a/src/components/TreeSelection/styles.ts +++ b/src/components/TreeSelection/styles.ts @@ -6,6 +6,11 @@ const styles = StyleSheet.create({ color: Colors.white, fontSize: moderateScale(18), }, + containerStyle: { + margin: moderateScale(20), + marginBottom: verticalScale(10), + alignItems: 'flex-start', + }, parentStyles: { backgroundColor: Colors.parentContainerColor, marginTop: verticalScale(5),