Skip to content
This repository was archived by the owner on Dec 24, 2019. It is now read-only.

Conversation

Gargron
Copy link
Contributor

@Gargron Gargron commented Sep 21, 2016

This permits a Redux container approach to NotificationStack where you get access to the dispatch function from a mapDispatchToProps object rather than mapStateToProps where the notifications themselves would be coming from.

@pburtchaell
Copy link
Owner

Hi @Gargron, thanks for the PR. CI is failing. Can you update this PR to pass tests?

@pburtchaell pburtchaell added the documentation Documentation and examples label Sep 21, 2016
@Gargron
Copy link
Contributor Author

Gargron commented Sep 21, 2016

Sorry about this, submitted a quick fix via the GitHub website and turns out my syntax wasn't on point. I'll need to properly check out the repo so it'll have to wait until tomorrow...

@Gargron
Copy link
Contributor Author

Gargron commented Sep 22, 2016

Okay, ready.

@pburtchaell
Copy link
Owner

@Gargron Can you rebase this? Once it's rebased, I can merge. Thanks!

@pburtchaell pburtchaell added the in progress Issues in progress by the author(s) label Nov 7, 2016
@pburtchaell
Copy link
Owner

@Gargron Following up: can you rebase this? Once it's rebased, I can merge. Thanks!

@Gargron
Copy link
Contributor Author

Gargron commented Nov 12, 2016

@pburtchaell (It's rebased)

Copy link
Owner

@pburtchaell pburtchaell left a comment

Choose a reason for hiding this comment

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

Thanks for the rebase! I have a requested change and then I can get this merged. 😄

@@ -22,6 +24,7 @@ const NotificationStack = props => (
const isLast = index === 0 && props.notifications.length === 1;
const barStyle = props.barStyleFactory(index, notification.barStyle);
const activeBarStyle = props.activeBarStyleFactory(index, notification.activeBarStyle);
const onClick = (notification.onClick || props.onClick) || defaultClick;
Copy link
Owner

Choose a reason for hiding this comment

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

Could you change this to just notification.onClick || props.onClick? Instead of using defaultClick you can use a default prop value.

@@ -10,6 +10,8 @@ function defaultStyleFactory(index, style) {
);
}

const defaultClick = () => {};
Copy link
Owner

Choose a reason for hiding this comment

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

This can be replaced with a default prop value.

@pburtchaell
Copy link
Owner

@Gargron Following up: I requested one change. Once that is completed, I can marge the PR. Thanks!

@pburtchaell
Copy link
Owner

Resolved 041dfe6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Documentation and examples in progress Issues in progress by the author(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants