Skip to content

Commit 8ae08e4

Browse files
author
Chen Oppenhaim
committed
Merge branch 'master' of https://github.com/mak12/rn-faded-scrollview into mak12-master
# Conflicts: # package.json # src/index.js
2 parents 68cc96c + 71a1b7d commit 8ae08e4

File tree

3 files changed

+36
-21
lines changed

3 files changed

+36
-21
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ This library accepts all the props of [ScrollView](https://reactnative.dev/docs/
2727
| fadeSize | Fade size i.e( width incase of horizontal and height incase of vertical ScrollView) | 20 | Number |
2828
| fadeColors | Colors for fade effect | ['rgba(229, 229, 229, 0.18)', 'rgba(206, 201, 201, 0.6)', 'rgba(206, 201, 201, 0.9)'] | Array |
2929
| scrollThreshold | Threshold to control fade hide/show when it reaches start or end | 10 | Number |
30-
| allowDivider | Allow divider at fade end. | false | Boolean. |
31-
| isRtl | For RTL Layouts | false | Boolean. |
30+
| allowDivider | Allow divider at fade end. | false | Boolean |
31+
| isRtl | For RTL Layouts | false | Boolean |
32+
| onContentSizeChange | onContentSizeChange call back added, function will return contentWidth and contentHeight | | Function |
3233

3334
### Styling
3435
For styling pass these props.

package.json

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,39 @@
11
{
2-
"name": "react-native-fading-scrollview",
3-
"version": "1.0.0",
4-
"description": "Allowing fade effects on top of react-native ScrollView component",
5-
"main": "index.js",
6-
"dependencies": {},
7-
"devDependencies": {},
2+
"name": "rn-faded-scrollview",
3+
"version": "1.0.11",
4+
"description": "A simple and customizable React Native component that allows you to add fade effect in ScrollView at both ends.",
5+
"main": "src/index.js",
86
"scripts": {
97
"test": "echo \"Error: no test specified\" && exit 1"
108
},
119
"repository": {
1210
"type": "git",
13-
"url": "git+https://github.com/chenop/rn-faded-scrollview.git"
11+
"url": "git+https://github.com/mak12/rn-faded-scrollview.git"
1412
},
1513
"keywords": [
16-
"\"scrollview\"",
17-
"\"scrollview",
18-
"fade\""
14+
"react-native",
15+
"scrollview",
16+
"scrollview faded",
17+
"faded scrollview",
18+
"fadedscrollview",
19+
"faded",
20+
"rn-faded-scrollview",
21+
"fade",
22+
"effects"
1923
],
20-
"author": "Chen Oppenhaim",
21-
"license": "ISC",
24+
"author": "Malik Abdul Kawee",
25+
"license": "MIT",
2226
"bugs": {
23-
"url": "https://github.com/chenop/rn-faded-scrollview/issues"
27+
"url": "https://github.com/mak12/rn-faded-scrollview/issues"
28+
},
29+
"homepage": "https://github.com/mak12/rn-faded-scrollview#readme",
30+
"peerDependencies": {
31+
"react": "16.11.0",
32+
"react-native": "0.62.2",
33+
"react-native-linear-gradient": "^2.x.x"
2434
},
25-
"homepage": "https://github.com/chenop/rn-faded-scrollview#readme"
26-
}
35+
"dependencies": {},
36+
"devDependencies": {
37+
"metro-react-native-babel-preset": "^0.59.0"
38+
}
39+
}

src/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ class RNFadedScrollView extends Component {
119119
return (this.props.horizontal ? <View
120120
style={[{ width: 1, height: '100%', backgroundColor: "#E6E6E6" }, this.props.dividerStyle]}
121121
/> : <View
122-
style={[{ width: '100%', height: 1, backgroundColor: "#E6E6E6" }, this.props.dividerStyle]}
123-
/>)
122+
style={[{ width: '100%', height: 1, backgroundColor: "#E6E6E6" }, this.props.dividerStyle]}
123+
/>)
124124
}
125125

126126
render() {
@@ -165,7 +165,8 @@ RNFadedScrollView.propTypes = {
165165
isCloseToStart: PropTypes.func,
166166
scrollThreshold: PropTypes.number,
167167
allowDivider: PropTypes.bool,
168-
isRtl: PropTypes.bool
168+
isRtl: PropTypes.bool,
169+
onContentSizeChange: PropTypes.func
169170
}
170171
RNFadedScrollView.defaultProps = {
171172
allowStartFade: false,
@@ -177,4 +178,4 @@ RNFadedScrollView.defaultProps = {
177178
isRtl: false
178179
}
179180

180-
export default React.forwardRef((props, ref) => <RNFadedScrollView {...props} innerRef={ref} />);
181+
export default React.forwardRef((props, ref) => <RNFadedScrollView {...props} innerRef={ref} />)

0 commit comments

Comments
 (0)