Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to make a custome style Scene component? #2990

Closed
felixzxk opened this issue Apr 12, 2018 · 1 comment
Closed

how to make a custome style Scene component? #2990

felixzxk opened this issue Apr 12, 2018 · 1 comment

Comments

@felixzxk
Copy link

felixzxk commented Apr 12, 2018

Version

  • react-native-router-flux version: '4.0.0-beta.28'
  • react-native version: '0.55.2',

Expected behaviour

import {Scene} from 'rect-native-router-flux';
const sceneStyle = {
  navigationBarStyle: {
    height: 44
  },
  titleStyle: {
    fontSize: 16,
    fontWeight: '100'
  }
}
export const MyScene = props => <Scene {...sceneStyle } {...props} />

and then at where I want to user MyScene

<MyScene {...someProps}  />

Actual behaviour

MyScene works, but sceneStyle does not work

@aksonov
Copy link
Owner

aksonov commented Jun 6, 2018

Please check Example project for details how to define sceneStyle - you must define sceneStyle key for the scene style like you did for titleStyle, etc.

const sceneStyle = {
  navigationBarStyle: {
    height: 44
  },
sceneStyle: {
   backgroundColor: 'red'
},
  titleStyle: {
    fontSize: 16,
    fontWeight: '100'
  }
}

@aksonov aksonov closed this as completed Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants