Skip to content

Commit fbd71dc

Browse files
committed
Improve documentation
1 parent f71e068 commit fbd71dc

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

README.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,38 @@ All of the properties of `View` are supported.
100100
| `onTouchTop` | `function` | Called when the Top of the component touch the Top of the ScrollView. (`onDisplay` + `onBeginHidden`) |
101101
| `onTouchBottom` | `function` | Called when the Bottom of the component touch the Top of the ScrollView. (`onHide` + `onBeginDisplayed`) |
102102

103-
### Contributing
103+
104+
105+
## FAQ
106+
107+
### How to remove the black image overlay
108+
109+
Just set the `maxOverlayOpacity` to `0`.
110+
111+
```jsx
112+
<HeaderImageScrollView
113+
minOverlayOpacity={0}
114+
maxOverlayOpacity={0}
115+
{/* ... */}
116+
/>
117+
118+
```
119+
120+
### How to remove the image zomming on scroll down
121+
122+
You have two solutions :
123+
124+
1. You can use the `disableHeaderGrow` props. It will keep the ios elastic scroll effect.
125+
2. You can also use the `bounces={false}` props [from the scroll view](https://facebook.github.io/react-native/docs/scrollview#bounces).
126+
127+
Results :
128+
129+
| `disableHeaderGrow` | `bounces={false}` |
130+
| ------------------- | ----------------- |
131+
![react-native-image-header-scroll-view demo disableHeaderGrow](./readmeAssets/demoDisableHeaderGrow.gif)|![react-native-image-header-scroll-view demo bounces](./readmeAssets/demoBounces.gif)
132+
133+
134+
## Contributing
104135

105136
All contributions are welcomed, that might be either adding new features, doing some refaco of the exisiting code or fixing bugs.
106137

@@ -109,8 +140,9 @@ All contributions are welcomed, that might be either adding new features, doing
109140
1. Fork the project & clone locally. Follow the initial setup here.
110141
2. Create a branch, naming it either a feature or bug: git checkout -b feature/that-new-feature or bug/fixing-that-bug
111142
3. Code and commit your changes. Write a good commit message. Best would be to use git [commitizen](https://github.com/commitizen/cz-cli)
112-
4. Push to the branch: git push origin feature/that-new-feature
113-
5. Create a pull request for your branch 🎉
143+
4. Test your changes in the [example repository](https://github.com/bamlab/react-native-image-header-scroll-view-example)
144+
5. Push to the branch: git push origin feature/that-new-feature
145+
6. Create a pull request for your branch 🎉
114146

115147

116148
## Other open-source modules by the folks at [BAM](http://github.com/bamlab)

readmeAssets/demoBounces.gif

1.89 MB
Loading
2.5 MB
Loading

0 commit comments

Comments
 (0)