netguru / sticky-parallax-header

A simple React Native library, enabling the creation of fully customized header for your iOS and Android apps.
https://netguru.github.io/sticky-parallax-header/
MIT License
1.86k stars 190 forks source link

Let the paddingBottom be configurable #387

Closed ythomop closed 1 year ago

ythomop commented 1 year ago

Feature request

As we can see in /src/primitiveComponents/withStickyHeader.tsx, paddingBottom is always equal to tabsHeight, which I understand, but I believe it would be nice if we could change this padding or, maybe, add a number to it, because, as it is right now, there is no gap between the last item of the list and the screen's bottom.

IMO, this is the best solution:

...
const { containerStyle, ...rest } = props
let paddingBottom = tabsHeight + (contentContainerStyle?.paddingBottom || 0);
...
<AnimatedComponent
  contentContainerStyle=[{ paddingBottom }]
  {...}
>
...