-
Notifications
You must be signed in to change notification settings - Fork 19
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
HTMLElement support?? #23
Comments
Never mind, i worked out that it does work but its been typed incorrectly as far as typescript goes. The Problem is that it isn't a HTMLElement as per its been typed prob better to be typed as a React.ReactNode I will try to remember to come back and make a PR to fix this for you, but anyone with the same problem can do the following to bypass typescripts check until a PR to fix the types exists. example const userErrorReport = (
<div>
Error Importing File:
<ul>{csvImportErrors.map(error => <li>{error.message}</li>)}</ul>
</div>
);
//@ts-ignore
ToastsStore.error(userErrorReport); |
Hello ! Yeah you are right, the typing has been badly defined, I had a bad understanding of react nodes typing at this moment. I will push a fix later today. |
dont stress not urgent :) and I think i'm 90% on a PR which isn't 100% ready yet.
I suspect it's already working, but I've only done it all with typescript type checking, I will set up a demo project to test it imports into another project as expected. |
oh just seen you've got a v4 branch as well, what where you hoping to achieve in your v4 version? |
Hello mrhut, sorry yesterday I have been quite busy. The goal of the v4 package is to support server side rendering by using the new React portal and by exporting the css externally. Then I started to work on another project and ... you know what happened :) |
I've tried numerous times to ToastStore.error() and send it a HtmlElement as per the typescript types you've defined and it always ends up crashing react.
I can provide further details, but hoping you can provide examples of using HtmlElements in your documentation?
The text was updated successfully, but these errors were encountered: