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

Fix toaster types #920

Open
wants to merge 1 commit into
base: master
from
Open

Conversation

@AntsiferovMaxim
Copy link

AntsiferovMaxim commented Aug 3, 2020

This resolves the type error when passing react component to toast

This resolves the type error when passing react component to toast
@akleiner2
Copy link
Contributor

akleiner2 commented Aug 28, 2020

@AntsiferovMaxim Thanks for this PR! Left a comment inline - let me know if you have any questions!

@@ -2312,19 +2312,19 @@ export const toaster: {
/**
* Opens a Toast with an intent of none.
*/
notify: (title: string, settings?: ToasterSettings) => void
notify: (title: string | React.ReactNode, settings?: ToasterSettings) => void

This comment has been minimized.

@akleiner2

akleiner2 Aug 28, 2020 Contributor

We can simplify these title types to just be React.ReactNode - React.ReactNode is a catch-all type that encompasses string as a part of it.

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.