1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

12.0 remove glamor (#6256)

* remove glamor

* change toaster style
This commit is contained in:
Michael An
2024-06-25 16:46:29 +08:00
committed by GitHub
parent 544ebe7fe6
commit 939c85d3c1
7 changed files with 183 additions and 398 deletions

View File

@@ -1,9 +1,10 @@
import React from 'react';
import ReactDom from 'react-dom';
import ReactDOM from 'react-dom';
import ToastManager from './toastManager';
const isBrowser =
typeof window !== 'undefined' && typeof window.document !== 'undefined';
import './toaster.css';
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
/**
* The Toaster manages the interactionsb between
@@ -17,7 +18,7 @@ export default class Toaster {
container.setAttribute('data-evergreen-toaster-container', '');
document.body.appendChild(container);
ReactDom.render(
ReactDOM.render(
<ToastManager
bindNotify={this._bindNotify}
bindGetToasts={this._bindGetToasts}
@@ -51,10 +52,6 @@ export default class Toaster {
return this.notifyHandler(title, { ...settings, intent: 'none' });
};
notifyInProgress = (title, settings = {}) => {
return this.notifyHandler(title, { ...settings, intent: 'notify-in-progress' });
};
success = (title, settings = {}) => {
return this.notifyHandler(title, { ...settings, intent: 'success' });
};