benevbright/react-navigation-collapsible

Styling custom header depending on scroll position or collapsed status

Closed this issue · 1 comments

I use a custom header and I'd like to add an elevation to the header only when the scroll position is not at the top of the screen and/or when the header is fully collapsed.

I can't figure how to that with the way the options actually works.

Any idea?


  /* in case you want to use your listener
  const listener = ({nativeEvent}) => {
    // I want to do something
  };
  const onScroll = onScrollWithListener(listener);
  */

Maybe you can use this listener?