react-router-native-stack icon indicating copy to clipboard operation
react-router-native-stack copied to clipboard

Could we separate the renderHeader for the bool and function?

Open gabrielbull opened this issue 7 years ago • 6 comments

https://github.com/Traviskn/react-router-native-stack/blob/c6a0e3a7e09f9b7d67db498853c60784f662685c/lib/Stack.js#L15

I think it would be more explicit if there was a different property for rendering the default header and renderHeader. The common way would be to have a prop header for the boolean and the renderHeader prop handle the render header function. We could also have a HeaderComponent prop to pass a component as the header.

So we would potentially have 3 properties to pass the header:

    header: bool,
    renderHeader: func,
    HeaderComponent: node

gabrielbull avatar Mar 23 '18 01:03 gabrielbull

I think this is a good idea! My implementation of the header is still incomplete. I am working on it on the header branch and am getting closer to having a working implementation

Traviskn avatar Mar 23 '18 02:03 Traviskn

I figured, I'm here to help. I'm using your header branch with some changes to re-create the same header as Apple has in the settings app, with the multiple animations (fade in/out on back button, translation/color change of header to become the back button, etc)

ezgif com-video-to-gif

Pretty cool stuff what we can do with this header branch.

gabrielbull avatar Mar 23 '18 02:03 gabrielbull

Nice! I appreciate the help 😄

Traviskn avatar Mar 23 '18 02:03 Traviskn

@Traviskn @gabrielbull I love ❤️ this module! I'm really keen to get the header branch into a proper master state so I we can use it for our project at work. How can I help? Is there a to-do list somewhere of what's missing?

Thanks!

nicollecastrog avatar Aug 15 '18 15:08 nicollecastrog

Unfortunately I haven't had much time to work on this module 😞 I'm not sure if I will have time to get my header branch into a working state, but I'd be open to any PRs that implement header transitions!

Traviskn avatar Aug 18 '18 20:08 Traviskn

@Traviskn Life happens, no worries! Here's my take on header/footer transitions: https://github.com/Traviskn/react-router-native-stack/pull/35 😄

nicollecastrog avatar Aug 20 '18 16:08 nicollecastrog