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

Change toast width? #72

Closed
myarete opened this issue May 7, 2018 · 2 comments
Closed

Change toast width? #72

myarete opened this issue May 7, 2018 · 2 comments

Comments

@myarete
Copy link

myarete commented May 7, 2018

Thanks for this project!

Is there a way to modify the toast to take up the full width of the screen and not just the content?

@sunshowerstack
Copy link

containerStyle: {
padding: 10,
width: 240,
height: 100,
},

@kevando
Copy link

kevando commented Jun 18, 2018

Thanks! For this effect I use the following

const toastParams = {
  delay: 200,
  position: (Platform.OS == 'ios' ? 64 : 54),
  shadow: false,
  opacity: 1.0,
  containerStyle: {
    paddingVertical: 1,
    width: sizes.width,
    borderRadius: 0,
  }
}
Toast.show(msg, {...toastParams, duration: 5000, backgroundColor: 'red'})

https://i.imgur.com/cBrXfTF.png

@myarete myarete closed this as completed Jul 12, 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

3 participants