Override navigationCard styles

Open
#66 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, react-native
Domain
mobile

Research direction

Start in styles.js and inspect how the navigationCard style is applied by the TabsRoute using the horizontal-pager transition. Reproduce the provided Root component with the background image and determine how a transparent background can be supplied without changing the existing layout behavior. Done means the image remains visible and the supported style override is clear.

Written by the indexing model from the issue text.

Description

Hi!
Thanks for this awesome library!

I have image on background in my app.

const style = {
    image: {
        flex: 1,
        width: null,
        height: null,
        resizeMode: 'cover',
    },
}

const Root = (props) => (
    <Image source={require('../assets/img/background.jpg')} style={style.image}>
        {props.children}
    </Image>
);

image

So, if I'm try to using <TabsRoute path="/" component={Root} transition="horizontal-pager">, then i have gray background instead image. I found in styles.js

navigationCard: {
    ...absoluteFillObject,
    overflow: 'hidden',
  },

Making this

navigationCard: {
    ...absoluteFillObject,
    backgroundColor: 'transparent',
    overflow: 'hidden',
  },

solve my issue.

Is there a way to override those styles?

Version
Dependency Version
react-router-native 2.0.0-beta.0
react-router N/A
react-native 0.37.0
Dominant language
JavaScript
Stars
636
Forks
37
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jmurzy/react-router-native

All issues in jmurzy/react-router-native

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.