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

Add in custom settings argument #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ktsosno
Copy link

@ktsosno ktsosno commented Feb 27, 2017

Added in an additional argument called settings to allow for some additional customization. In this case, I added a fullWidth option allowing for the toast to expand full width of the application.

Tested across major browsers and mobile.

Screenshot:
testapp

@@ -35,7 +36,6 @@ class Toast extends React.Component {

const containerStyle = {
position: 'fixed',
width: '50%',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the behaviour when this width is removed?. (I agree that 50% is not a very smart default here). But does it break layout if you don't pass the fullWidth setting?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually removed this as it didn't have an effect on the width. The 0px left and right on a fixed position element would override the width settings.

@juliapolbach
Copy link

Hi! I would really appreciate if you could considerate adding the fullWidth behaviour setting. Thanks in advance.

@jesusoterogomez
Copy link
Owner

The reason of why I haven't merged this functionality, is because I was planning to use the recently introduced "options" argument to override default styling as well. I will look on how this can be done soon. I am currently moving places so it could take me a few days before I can look into it.

@juliapolbach
Copy link

Thanks Jesús! Your notifier is great, by the way. My team and I are using it in production mode for a backoffice project and it works really smooth. I'll keep an eye :)

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

Successfully merging this pull request may close these issues.

3 participants