GithubHelp home page GithubHelp logo

bmcmahen / toasted-notes Goto Github PK

View Code? Open in Web Editor NEW
255.0 5.0 28.0 2.35 MB

simple, flexible toast notifications for react

Home Page: https://toasted-notes.netlify.com

JavaScript 18.34% CSS 7.88% TypeScript 73.78%
react notifications toast-message toast

toasted-notes's People

Contributors

bmcmahen avatar frederikbolding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

toasted-notes's Issues

Positions in top is not working react-spring v9

With react-spring in version 9 the top-left, top and top-right is not showing ok, it is a problem with the translate because when is on top show transform: translateY(-100%); and never change

accessibility for interactive notes

I need to explore the correct way to ensure that these elements are accessible to screen-readers. I suspect we will either need to look for elements that can be focused, and focused them automatically, or delegate the focus code to the user w/ a helper function of some sort.

Getting React state update error when calling toast

We are getting the following error when calling the toast function..

Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. in ToastManager

We are simply calling the toast function on an axios error.

Using React latest version (16.13.1).

Possible to display only one instance of toaster

Is it possible to display only one instance of toaster?
I have a scenario where I use the toaster to prompt user for input and toaster will only be dismissed by user's action
A user may trigger another toaster but the previous should go away immediately.

Thanks

context support

Given the current API, jsx in render props or elements won't get access to context. Explore ways to support context while maintaining the current API, and inform users of ways to supply context to their render callback (wrap it with context providers).

No way to call `closeToast`, `removeToast` without an id

Since notify doesn't return the generated id and there is no way of setting an id via incoming props, currently neither closeToast or removeToast can be used.

notify should return the id of the toast created by createToastState so we can reference it.

Support for closing a single toast

Would love support for closing a single toast, maybe notify could return an id that could simply be passed to a close function to allow closing the toast outside the toast itself.

Can't load styles to the Toasts

Good morning, I'm trying to use the API, but when calling the Toaster with:
toaster.notify(description, {duration: 5000, position: 'bottom-left'});, I get the following:
image

Then I have tried to use :
const CustomNotification = ({ title }) => { const theme = useTheme(); return <div style={{ color: theme.primary }}>{title}</div>; }; const CustomNotificationWithTheme = withTheme(CustomNotification); toaster.notify(() => <CustomNotificationWithTheme title="I am pretty" />);
But I get errors about useTheme() and withTheme()

Is there something I'm missing?
Thanks for your time

pointer-events

containers shouldn't have any pointer-events, while actual notifications should

react-spring v9.0.0 incompatible

I worked with react-spring elsewhere in my project and realized it was on v9.0.0 and all my toasts stopped working with an odd error saying something like cannot destructure property 'reset' from undefined. I knew it had to be react-spring since I just worked with it directly elsewhere and unknowingly upgraded to v9.0.0. So I checked master over here and noticed that the dependency for this project relies on v8.0.0. A downgrade in my project to react-spring v8.0.0 fixed the issue, just noting here for future people.

License?

Would love to know license on this software. Thanks ๐Ÿ˜Š

First toast is not animating into the screen

I like this package, i am just having some strange behaviour when calling toast.notify.

From some components it is firing perfectly, and others the animation does not start and it is stuck above the screen.

The only difference between the components I can note is that one is a top level route, and one is a nested route.

bottom exit animation doesn't match top exit animation

This is because we animate the height attribute.

Possible solutions include using marginTop, marginBottom as animation attributes, or absolutely positioning the element inside.

I'm not hugely concerned with this but my ocd might get the better of me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.