mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix: image preview (#2818)
This commit is contained in:
@@ -67,7 +67,7 @@ export const toast = (
|
||||
duration: 2500,
|
||||
}
|
||||
) => {
|
||||
if (!ToastContainer) {
|
||||
if (!ToastContainer || (portal && !portal.contains(ToastContainer))) {
|
||||
ToastContainer = createToastContainer(portal);
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ export const toast = (
|
||||
element.style.margin = '0';
|
||||
element.style.padding = '0';
|
||||
// wait for transition
|
||||
// ToastContainer = null;
|
||||
element.addEventListener('transitionend', () => {
|
||||
element.remove();
|
||||
});
|
||||
|
||||
@@ -11,6 +11,8 @@ const StyledTooltip = styled(StyledPopperContainer)(() => {
|
||||
backgroundColor: 'var(--affine-tooltip)',
|
||||
color: 'var(--affine-white)',
|
||||
fontSize: 'var(--affine-font-sm)',
|
||||
borderRadius: '8px',
|
||||
marginBottom: '12px',
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user