Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

feat: support transform style for header #158

Merged
merged 2 commits into from
Nov 4, 2019

Conversation

Freddy03h
Copy link
Contributor

Two related things in this PR:

  • add transform in the safeStyles headerStyle
  • add the safeStyles headerStyle as argument in the headerBackground function

Use case: Create a collapsible scrollview header. To migrate this use case from 4 to 5 this PR is needed but the philosophy isn't far from previous react-navigation. You need to set headerTransparent to true and use a custom headerBackground (even if don't really want a custom one).

It's needed to transform the headerBackground and the View that wrap the headerLeft/Right and the headerTitle.
Also, giving headerStyle as argument to headerBackground function make it easier to customize by setting an headerStyle option in a screen instead of recreate an entire headerBackground for each screen.

@codecov-io
Copy link

Codecov Report

Merging #158 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #158   +/-   ##
=======================================
  Coverage   93.27%   93.27%           
=======================================
  Files          36       36           
  Lines         758      758           
  Branches      191      191           
=======================================
  Hits          707      707           
  Misses         42       42           
  Partials        9        9

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a4c38b...311a2cf. Read the comment docs.

@satya164 satya164 changed the title Header style transform feat: support transform style for header Nov 4, 2019
@satya164 satya164 merged commit a93a81e into react-navigation:master Nov 4, 2019
@Freddy03h
Copy link
Contributor Author

thank's for the approval

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants