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

31 lines
804 B
React
Raw Normal View History

2017-10-13 02:53:33 +08:00
import React from 'react';
2021-11-10 19:37:08 +08:00
import Styled from './styles';
import Settings from '/imports/ui/services/settings';
class ToastContainer extends React.Component {
// we never want this component to update since will break Toastify
shouldComponentUpdate() {
return false;
}
render() {
2021-11-10 19:37:08 +08:00
const { animations } = Settings.application;
2019-04-10 01:55:10 +08:00
return (
2021-11-11 04:31:00 +08:00
<Styled.ToastifyContainer
2023-07-21 03:59:53 +08:00
closeButton={(<Styled.CloseIcon data-test="closeToastBtn" iconName="close" animations={animations} />)}
2019-04-10 01:55:10 +08:00
autoClose={5000}
2021-11-11 04:31:00 +08:00
toastClassName="toastClass"
bodyClassName="toastBodyClass"
progressClassName="toastProgressClass"
2019-04-10 01:55:10 +08:00
newestOnTop={false}
hideProgressBar={false}
closeOnClick
pauseOnHover
/>
);
}
}
2019-04-10 01:55:10 +08:00
export default ToastContainer;