bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/toast/container.jsx

32 lines
784 B
React
Raw Normal View History

2017-10-13 02:53:33 +08:00
import React from 'react';
import { ToastContainer as Toastify } from 'react-toastify';
2017-10-13 02:53:33 +08:00
import Icon from '../icon/component';
2018-01-08 14:17:18 +08:00
import { styles } from './styles';
class ToastContainer extends React.Component {
// we never want this component to update since will break Toastify
shouldComponentUpdate() {
return false;
}
render() {
2019-04-10 01:55:10 +08:00
return (
<Toastify
closeButton={(<Icon className={styles.close} iconName="close" />)}
autoClose={5000}
className={styles.container}
toastClassName={styles.toast}
bodyClassName={styles.body}
progressClassName={styles.progress}
newestOnTop={false}
hideProgressBar={false}
closeOnClick
pauseOnHover
/>
);
}
}
2019-04-10 01:55:10 +08:00
export default ToastContainer;