Giter Site home page Giter Site logo

Comments (4)

alterx avatar alterx commented on May 24, 2024 1

Yeah, I'm using NativeBase and it turns out I needed to add a couple of extra styles on my end :)
Thanks for the quick response.

from react-native-stager.

pocesar avatar pocesar commented on May 24, 2024

by default, it'll always stick to the edges of the available area but will try to compensate for the prev/next button area https://github.com/pocesar/react-native-stager/blob/master/src/index.tsx#L55-L62

although not ideal (and usually not endorsed when doing React, by using inheritance), you could extend the Stager / Stage override and implement your own stuff like:

class MyStage extends Stage { 
  render() {
    /* your stuff with your styles */
  }
}

class MyStager extends Stager { 
  render() {
    /* your stuff with your styles */
  }
}

would just need to make sure to place the correct props and state members on their places, and you should be good to go.

I could of course make some changes and add a render or component prop, but passing the needed information as render props to yet another prop might go overboard. also with the new context API, it would need to be changed nevertheless

also, now that I'm thinking about it, I'm not sure if you modify the import { styles } from 'react-native-stager' would be possible, if so, you could just edit the hardcoded style to your liking

from react-native-stager.

alterx avatar alterx commented on May 24, 2024

Yeah @pocesar , inheriting is the last thing I want to do. That's why I reached to you, maybe there was something else that could be done.

What you say is interesting, tho. I'm seeing something slightly different with the stage and the buttons: they get pushed up if the contents of the stage are not filling the full height of the container.

buttons

from react-native-stager.

pocesar avatar pocesar commented on May 24, 2024

have you tried using StageButtons with a position absolute? have you set your parent View (of the Stager) to use all the window height as well?

from react-native-stager.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.