Giter Site home page Giter Site logo

diegoddox / react-redux-toastr Goto Github PK

View Code? Open in Web Editor NEW
751.0 9.0 150.0 2.25 MB

react-redux-toastr is a toastr message implemented with Redux

Home Page: http://diegoddox.github.io/react-redux-toastr/

License: MIT License

JavaScript 80.28% SCSS 19.72%
redux toastr react

react-redux-toastr's Introduction

react-redux-toastr demo

NPM Version NPM Downloads Package Quality Closed Issues  GitHub Stars

react-redux-toastr

react-redux-toastr is a React toastr message implemented with Redux, primary consists of three things: a reducer, toastr emitter and a React component.

The reducer listens to dispatched actions from the component to maintain the toastr state in Redux.

Implementation Guide

1. Installation

npm install --save react-redux-toastr

2. Add the styles
  • import the scss file into to your project.

    @import 'react-redux-toastr/src/styles/index';
  • or import the css file.

import 'react-redux-toastr/lib/css/react-redux-toastr.min.css'
  • or include the css file from the demo site (NOTE: This file can be changed anytime)
<link href="https://diegoddox.github.io/react-redux-toastr/7.1/react-redux-toastr.min.css" rel="stylesheet" type="text/css">
3. Add the reducer.
import {createStore, combineReducers} from 'redux'
import {reducer as toastrReducer} from 'react-redux-toastr'
const reducers = {
  // ... other reducers ...
  toastr: toastrReducer // <- Mounted at toastr.
}
const reducer = combineReducers(reducers)
const store = createStore(reducer)

NOTE: The default mount point for react-redux-toastr is toastr.

4. Add the component into an app root
import {Provider}  from 'react-redux'
import ReduxToastr from 'react-redux-toastr'

<Provider store={store}>
  <div>
    ... other things like router ...
    // props are not required
    <ReduxToastr
      timeOut={4000}
      newestOnTop={false}
      preventDuplicates
      position="top-left"
      getState={(state) => state.toastr} // This is the default
      transitionIn="fadeIn"
      transitionOut="fadeOut"
      progressBar
      closeOnToastrClick/>
  </div>
</Provider>

The default configuration is:

{
  timeOut: 5000,
  newestOnTop: true,
  position: 'top-right',
  transitionIn: 'bounceIn',
  transitionOut: 'bounceOut',
  progressBar: false,
  closeOnToastrClick: false,
}

NOTE: transitionIn and transitionOut will affect the confirm animation as well

Here is the full list of available configurations:

  • position: top-left top-center top-right bottom-left bottom-center and bottom-right

  • transitionIn: bounceIn bounceInDown and fadeIn

  • transitionOut: bounceOut bounceOutUp and fadeOut

5. Use the emitter

The toastr method use eventemitter3 to dispatch the actions

import React, {Component}  from 'react'
import {toastr} from 'react-redux-toastr'

export class YourComponent extends Component {
  render() {
    return (
      <div>
        <button
          onClick={() => toastr.success('The title', 'The message')}
          type="button">Toastr Success</button>
      </div>
    )
  }
}

Or you can bind the actions to your component if you prefer.

import {bindActionCreators} from 'redux'
import {actions as toastrActions} from 'react-redux-toastr'
// In your React component
constructor(props) {
  super(props);
  // Bind the react-redux-toastr actions to the component
  this.toastr = bindActionCreators(toastrActions, this.props.dispatch)

  this.toastr.add({
   id: 'mycustomid', // If not provided we will add one.
   type: 'success',
   title: 'your title',
   position: 'top-left', // This will override the global props position.
   attention: true, // This will add a shadow like the confirm method.
   onAttentionClick: (id) => {}, //override default behavior of 'attention' background click.
   message: 'message',
   options: {}
  });

  this.toastr.remove('toastrId');
}

Toastr methods

Toastr accepts the following methods: success info warning light error confirm message, remove and removeByType

Toastr: success info warning light error remove and removeByType

Each of these methods can take up to three arguments the title a message and options.

In options you can specify timeOut icon onShowComplete onHideComplete className component removeOnHover,removeOnHoverTimeOut,showCloseButton, onCloseButtonClick, onToastrClick, progressBar, transitionIn, position, attention, onAttentionClick, transitionOut and closeOnToastrClick.

import {toastr} from 'react-redux-toastr'

const toastrOptions = {
  timeOut: 3000, // by setting to 0 it will prevent the auto close
  icon: (<myCustomIconOrAvatar />), // You can add any component you want but note that the width and height are 70px ;)
  onShowComplete: () => console.log('SHOW: animation is done'),
  onHideComplete: () => console.log('HIDE: animation is done'),
  onCloseButtonClick: () => console.log('Close button was clicked'),
  onToastrClick: () => console.log('Toastr was clicked'),
  showCloseButton: true, // false by default
  closeOnToastrClick: true, // false by default, this will close the toastr when user clicks on it
  component: ( // this option will give you a func 'remove' as props
    <MyCustomComponent myProp="myValue">
      <span>Hello, World!</span>
    </MyCustomComponent>
  )
}

toastr.success('Title', 'Message', toastrOptions)
toastr.info('The message', toastrOptions)
toastr.warning('The title', 'The message')
toastr.error('The message')
toastr.removeByType('error') // Remove all toastrs with the type error.
toastr.remove('123') // Removes toastr with id '123'
Toastr methods light

The light method is like the other toastr except that the background-color is white and you can add a top border on top of the toastr by passing the status option

icon can be one of the following:

  • 'success'
  • 'info'
  • 'warning'
  • 'error'
import {toastr} from 'react-redux-toastr'

const toastrType = 'warning';
const toastrOptions = {
  icon: toastrType,
  status: toastrType
}

toastr.light('The title', 'The message', toastrOptions)
Toastr: message

Use this one if you wanna show a large amount of information. Unlike the other methods above, it would not close automatically unless you provide a timeout in the message options.

const toastrMessageOptions = {
  timeOut: 3000, // Default value is 0
  onShowComplete: () => console.log('SHOW: animation is done'),
  onHideComplete: () => console.log('HIDE: animation is done'),
  removeOnHover: false, // Default value is false
  removeOnHoverTimeOut: 1000, // Default value is 1000
  component: React.Component
};
toastr.message('Title', toastrMessageOptions)
Toastr: confirm

The confirm method takes two arguments. The first one is the message and the second one is an object where you can specify what will happen when the user clicks on ok or on the cancel buttons or on keypress enter/esc.

NOTE: You can only have one confirm toastr at the same time. If you have one confirm and you fire another it will be ignored.

const toastrConfirmOptions = {
  onOk: () => console.log('OK: clicked'),
  onCancel: () => console.log('CANCEL: clicked')
};
toastr.confirm('Are you sure about that!', toastrConfirmOptions);

You can add a manually specified CSS ID selector to the confirmation wrapper element by:

  • Including an id prop in the toasterConfirmOptions object:
const toastrConfirmOptions = {
  ...
  id: 'my-custom-id'
};
toastr.confirm('Are you sure about that!', toastrConfirmOptions);

You can change the ok and cancel texts by:

  • Passing confirmOptions to the ReduxToastr component:
<!-- please define both keys as this will override default okText & cancelText -->
const options = {
  okText: 'confirm text',
  cancelText: 'cancel text'
};
<ReduxToastr confirmOptions={options}/>
  • Passing okText and cancelText in the toasterConfirmOptions object:
const toastrConfirmOptions = {
  ...
  okText: 'confirm text',
  cancelText: 'cancel text'
};

toastr.confirm('Are you sure about that!', toastrConfirmOptions);

You can make it so ok is the only button by:

  • Passing disableCancel in the toasterConfirmOptions object:
const toastrConfirmOptions = {
  ...
  disableCancel: true
};

toastr.confirm('You have timed out! Please log back in.', toastrConfirmOptions);

You can add custom buttons by:

  • Passing buttons in the toasterConfirmOptions object.

    The buttons are inserted after the OK and the cancel buttons.

    Each button config can have a text, handler and a className property.

    If you want to move the original OK or cancel buttons to a different postiion, just insert a an object with a single boolean flag: ok or cancel to the desired position inside buttons. (note that all other properties are ignored in this case).

The following config leads to 3 buttons in the following order:

  1. "Apply" (original OK button)
  2. "Do not apply" (our custom button)
  3. "Cancel" (original cancel button)
const toastrConfirmOptions = {
  ...
  okText: 'Apply',
  buttons: [{
    text: 'Do not apply',
    className: 'do-not-apply-btn',
    handler: () => console.log('do-not-apply clicked')
  }, {
    cancel: true // move the cancel button to the end
  }]
};

toastr.confirm('Your changes are applicable to 5 more records.', toastrConfirmOptions);

You can render your custom message component instead of the simple string message by:

  • Passing the component prop to the toasterConfirmOptions object:
const toastrConfirmOptions = {
  ...
  component: () => (
    <MyCustomComponent myProp="myValue">
      <span>Hello, World!</span>
    </MyCustomComponent>
  )
};

toastr.confirm(null, toastrConfirmOptions); // pass null for message

You can allow user to close confirm dialog by clicking in empty space

  • Passing closeOnShadowClick in the toasterConfirmOptions object:
const toastrConfirmOptions = {
  ...
  closeOnShadowClick: true
};

toastr.confirm('You have timed out! Please log back in.', toastrConfirmOptions);

Avatar: in case you wanna use the same avatar as in the example

Avatar

Run a local demo

git clone https://github.com/diegoddox/react-redux-toastr.git
cd react-redux-toastr
npm install
npm start

open your browser at http://localhost:3000

License

MIT. Copyright (c) 2016 Diego Oliveira.

react-redux-toastr's People

Contributors

aodinok avatar bilyachenkooy avatar c-rodg avatar camperov avatar cescoferraro avatar dcmdestello avatar declanibberson avatar denjohx avatar diegoddox avatar djulbicb avatar emrysmyrddin avatar icidasset avatar ironyee avatar jalkoby avatar mirayareie avatar mordred avatar ofir-shapira-como avatar petetnt avatar pjarmalavicius avatar printfn avatar rayronvictor avatar ro-savage avatar rzueger avatar sdvcrx avatar stevemao avatar szabadember avatar tomasztomys avatar traverse avatar ugurcanlacin avatar vzaidman 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  avatar  avatar  avatar  avatar

react-redux-toastr's Issues

[WEIRD] when enable redux-devtools

Hi, awesome work.

First ,I triggered toastr.error('## Info', "asdasd") at router /a and wait for message dismiss, then I switched to router /b, the message appeared again! just like clean action revoked. I rechecked my code multiple times, every integration step goes fine. Looked into toastr sourcecode, nothing help. At las t, I opened Edge, it runs fine! So finally, I got here 😷

It's really weird, I don't know whether or not posting issue to redux-devtools or here.

Icon prefix

You souhould provide prefix to toaster icons..

[data-icon]:before 
....
[class^="icon-"]:before,
[class*=" icon-"]:before

This is too bad. Also "!important" is not good to use.

Extra blank space on top of the page.

because the width and height is not set to 0px in some browser can appear an extra blank space on top of the page.

Need to set width and height to 0px in .redux-toastr

Toastr does not timeout / is not removed.

I am getting a behaviour where the toastr sometimes will not close or timeout. I have set the timeout to 3000 and the toastr type is success.

It seems to be intermittent. The Add action fires and then the Remove action does not.

Im using Chrome version 52.0.2743.116 m
react-redux-toastr version 3.1.4
react-redux version 4.0.6
react version 15.1.0
redux version 3.0.5

Fonts directory is missing

Current release is missing fonts directory in /lib.
Css file is expecting fonts to be at /lib/fonts/.

Reverting back to 3.8.5 corrected the issue.

More control over the Toasts Options

Hi Diego,

Would it be possible for you to provide a finer control on how the closing of toastrs works with user interaction.

Be able to:

  1. Toggle on/off the hiding of the toastr when you click it
  2. Toggle on/off the hiding of the toastr when you hover in and out of it
  3. Provide an option to show a 'x' to close the toastr. (Ive seen this in you demo but cant get it to work for my application)
  4. Provide the ability to hide/show the icons
  5. Provide the ability to apply custom classes to the toastr.

Thanks
James

Message should be word-warp

Any idea how to workarround to add word-warp text in message div? I cannot modify css because it is imported directly. I think message css class should support word-wrap: break-word attribute original.

image

My problem as bellow picture:

image

Include the 'fonts' directory in lib

Currently the css files that end up in the lib folder have:

src: url("../fonts/redux-toastr.eot");

but the fonts directory does not exist so it fails to import.

Cannot import actions constants

I want to catch the action type of the toaster to check it and take some runtime decisions.

¿How can i import them directly?
¿Can i do this?

import {REACT_REDUX_TOASTER_ACTION_TYPES_OR_WHATELSE as toasterActionTypes } from 'react-redux-toaster'

Toastr confirm Message with React Component

Hi, Thanks for the great library,
In the application i'm working on, we have internationalisation in place using react-intl, So every text in our app we use the <FormattedMessage /> component.

So this is what i'm doing to show a confirmation message:

toastr.confirm(
  <FormattedMessage
     id="app.are_u_sure"
     defaultMessage="Are u sure?"
  />, {
   onOk: () => fn(app.id),
   onCancel: () => {},
});

But this is how it show on the screen:
screen shot 2016-09-15 at 09 31 27

Would it be possible to allow to render React component as a message, maybe i'm missing something?

Why !important

Tel me why this is !important?
This overwrites my custom fonts :o

[data-icon]:before {
  font-family: "redux-toastr" !important;
  content: attr(data-icon);
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  speak: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

IE10 Support

First up, awesome toast, we are loving it.

I am using it on our site that requires IE10 support. Unfortunately Map isn't support by IE10 and Map can't be polyfilled / shimmed.

I have forked the repo and changed Map to a regular Object.

Feel free to accept PR if you'd like to support IE10, or suggest another way of handling IE10 :)

Time-travel side-effects problem

Hi,

Thanks for a great project. I looked at this primarily due to being able to do time-travel on my apps, also for UI notifications.

But, I think I have found a bug. I demoed my project today for a colleague and used time-travel to show off some parts of it. I then noticed that the toastr remove actions re-fired. Could it be that the remove-event is not controlled by a timer from within the original add-action? Or that the removal-timer is somehow dependent on the rendering of the page?

If so, then I think time-travel is not going to work, because it will create new remove-actions also for old notifications that have already been both added and removed already. Without this the whole point of using the react-redux-toastr becomes moot. I think that the removal timer has to be set from the original show action, which makes sure that it is not re-fired just because a state is rendered.

Time-travelling should never fire new actions by itself. The user could do stuff during time-travel that will make the app mutate away from the original state, yes. And - if the app depends on polling or somehow updating it's state based on live data from external source then that will of course also lead to extra actions. If I am debugging my app (that has none of the above side-effects), using an exported state-list from e.g. a user, then I would not expect any actions to fire, unless I explicitly executes them myself.

Please correct me if I am wrong in any of my assumptions here.

Confirm box broken - Won't dismiss

The confirm box is no longer working. Confirmed on demo page and installing repo locally.

Not sure exactly what going on.

It appears that the utils function onCSSTransitionEnd which fires ReactTransitionEvents.addEndEventListener(node, runOnce); is being attached but never fired.

It seems to be broken in older versions (3.1.4) as well, so it might be a dependancy breaking?
Possibly import CSSCore from 'fbjs/lib/CSSCore'; or import ReactTransitionEvents from 'react/lib/ReactTransitionEvents';

New NPM release

Could we get a new npm release? So the few fixes that have been added (lingering console.log) could be removed from the npm version.

Issues with server side rendering

error given was: ReferenceError: navigator is not defined

Probably because navigator and window are not available when rendering on the server-side.

Invoke component option directly, rather than as a class reference

I'm having issues with the component option, as it does not allow me to pass dynamic props. This is due to the expectation of a class reference being passed (i.e. component: React.Component), rather than a JSX expression.

In ToastrBox.js we have

{this.props.item.options.component &&
  <div className="message">
    <this.props.item.options.component />
  </div>
}

Meaning the options component is rendered with no properties.

What I'd like to be able to do, is to have a dynamically generated component, so I am able to able to pass props (and children) to it.

i.e.

toastr.error('An error occurred', `The error code was ${errorCode}` {
  timeout: false
  component: (
    <Link to={`/faqs/error/${errorCode}`}>More information on this error</Link>
  )
});

It seems this would only require a simple change to the code

{this.props.item.options.component &&
  <div className="message">
    {this.props.item.options.component} // Curly braces, rather than < angle brackets />
  </div>
}

This appears to be much more powerful than the existing solution. Any thoughts?

ToastrBox are not removed after timeout expiration

For a strange reason, ToastrBoxes are not removed after they expire (setTimeout triggers the remove handler).

By debugging the code, I found out that this line: https://github.com/diegoddox/react-redux-toastr/blob/master/src/ToastrBox.js#L98 never calls the onAnimationComplite for an unknown reason.

Fyi, I'm using React 0.14 and React-Redux-Toastr latest version, it seems to be a regression, because the old Redux-Toastr version worked fine for me. I had to upgrade (because I was using the github.io for the styles... it's my fault on this one >_<).

I'm not accustomed to CSSCore and low-level animation handlers to understand why this issue is happening, any idea?

EDIT: After looking Event Listeners on my DOM node (the message one), I see that the animationend and transitionend are registered for the onCSSTransitionEnd (runOnce) helper function.

My questions are:

  • Does the node really trigger a transitionend or an animationend event?
  • Do we add the event listener too late so that we miss the event?
  • Does the runOnce throws something?
  • It seems like that there is multiple handlers on the same node from runOnce, do we really run it once? If no, e.stopPropagation() may prevent the next handlers to get called, right?

EDIT2:
Browser used: Chromium 48.0 64 bits under Arch Linux (updated & all the shiny stuff).

EDIT3:
This problem applies also to ToastrConfirm.

EDIT4:
The problem seems to be due to the fact that I was not using your CSS link rather, a copy of react-redux-toastr.min.css without any fonts, it is maybe related to this then.

Then, the question is: "How to properly bundle your styles (assuming I'm using Webpack)?"

React 15.x compatibility?

Hi there,

Is it planned for this package to get a React 15.x compatibility?
Could I lend a help?

Thanks in advance!

Notification upper again when location change

fix is listen for LOCATION_CHANGE and clear toastr, but I'm sure when this is correct

(function used in redux-saga)

function* watchLocationChange() {
while (true) {
try {
yield take(LOCATION_CHANGE);
toastr.clean();
} catch (e) {
log.error(e);
}
}
}

Align toastr to center

Hi,

I have been trying to center align the toastr but have not succeeded in doing so.
I went through the documentation and found that the toastr can only be aligned to the four corners of the page.

Is there a way to center align the toastr?

Thanks for the awesome react-redux-toastr

Demo site differs

I noticed on the demo site, a toast is clickable and disappears instantly when clicked on anywhere.
Running the app locally, you lose the "pointer cursor" and toasts no longer disappears upon click.

unknown prop 'remove' warning

I'm getting

Warning: Unknown prop `remove` on <div> tag. Remove this prop from the element.
...
in div (created by ToastrBox)

using react 15.3.2

when invoking this code:

        let url = this._getShareUrl()
        let toastrOptions = {
            component: (
                <div>
                <input value = {url} readOnly />
                </div>
            )
        }
        toastr.message('Share charts',toastrOptions)

Any ideas how to resolve this?

the message refers me to this: https://facebook.github.io/react/warnings/unknown-prop.html

Re: toastr: nice module!!

Cannot read property 'confirm' of undefined

I have the following in App.js

<Provider store={store}>
        <div>
          <ReduxToastr />
          <Router history={hashHistory}>
            <Route path='/admin' component={Comp1}>
              {/* some components here*/}
            </Route>
            <Route path="/" component={Comp2}>
            {/* some components here*/}
          </Router>
        </div>
      </Provider>

I can not even start the app because I keep getting a "Cannot read property 'confirm' of undefined" error from the ReduxToastr component

Content served over http

Serving your site from a https source produces the following error:
Mixed Content: The page at 'https://xx.xx.com/login' was loaded over HTTPS, but requested an insecure font 'http://diegoddox.github.io/react-redux-toastr/fonts/redux-toastr.woff'. This request has been blocked; the content must be served over HTTPS.

Not implementing standard toast messages

I tried using it but it looks like a lot of the styles are not properly implemented and I can't actually remove the close button. The documentation is scarce and there are very few options to be had.

Confirm box is not shown in node version 6.3.1

Ive just updated to node version 6.3.1 and the toastr confirm box stopped being displayed.
Im seeing the @ReduxToastr/confirm/SHOW action on the console but nothing happens.

node version: 6.3.1
browser: chrome 53.0.2785.143
os: OSX 10.11.3
react-redux-toastr 3.8.5

EDIT: I can confirm the issue was introduced in 3.8.0 as the last version working is 3.7.1

ToastrConfirm does not close if you show an error upon ok or cancel

Hi!

It seems like that something is preventing the ToastrConfirm from closing when you dispatch a toastr in the ok or cancel handler.

It causes something like:

ok clicked → setTransition(false) (hiding = true) → add a new toastr → componentDidUpdate on ToastrConfirm (hiding = false) → once animation is complete, hiding is false so we don't remove the overlay.

At least, this is what I found by debugging.

Why did you remove the `src` dir?

Your instructions in the README say to do this:

2. Add the react-redux-toastr css link to your app
NOTE: This can be change at anytime
<link href="http://diegoddox.github.io/react-redux-toastr/3.0.0/react-redux-toastr.min.css" rel="stylesheet" type="text/css">

But I prefer:

import 'react-redux-toastr/src/less/react-redux-toastr'

Now I can't do that because the src directory is missing. If I try to use the lib/react-redux-toastr.css, it complains that the ../fonts/redux-toastr.eot is missing, etc, so it looks like the fonts directory was removed too.

Programmaticly close a specific toastr

Hi Deigo,

It would be really awesome if you could provide some way for us to programmitcally close a specific toastr.

Currently I'm using the toastr to display a progress bar for an action I'm performing in my application, which I achieved by passing in a custom component in the toastr options. I want to be able to hide this toastr once the progress has reached 100% and then display a success toastr to the user.

option 2

Do you think you would be able to provide such a feature?

Thanks
James

Question and possible issue with toastr insertion point

Hi there,
I'm just getting to grips with the full react-redux ecosystem. I've inserted the toastr as suggested and I see the actions dispatched and they are present in the store but no toasts appear.

I can see that the html for the toast is inserted into the page, but it's never populated with text and animated.

The only thing I can think of is that it's something to do with insertion. I have an I18N wrapper and so I've had to insert it like this:

  return (
    <Provider store={props.store}>
      <IntlWrapper>
        <div>
          <Router history={browserHistory}>
            {content}
          </Router>
          <ReduxToastr
            timeOut={4000}
            newestOnTop={false}
            position="top-left"
          />
        </div>
      </IntlWrapper>
    </Provider>
  );

...could that have anything to do with it??

Select different animations

Hello, I'm using your library and I find it very useful.
Just out of curiosity, is there a way to specify different animations for the toasts? I see that there are many in the css file but I don't know how to use them!

Thank you.

timeOut overriden by ReduxToastr props

I'm trying to use your library to show toasts in our application but I'm having issue with the timeOut option

I dispatched this action:

toastrActions.error(
  'Something failed',
  'Should be visible until dismissed',
  { timeOut: 0 }
);

But the timeOut gets always overriden by my ReduxToastr component prop:

<ReduxToastr
    timeOut={4000}
    newestOnTop={false}
    position="top-right" />

I'm getting same results when I try removing the timeOut prop:

<ReduxToastr
    newestOnTop={false}
    position="top-right" />

Is there any way to make some Toasts dissappear after timeOut and some (f.e. errors) to keep here until dismissed?

Thank you,
Michael

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.