Skip to content

Commit fe12e11

Browse files
committed
fix: Adjustment of the toast component's position from the top
1 parent ef982ee commit fe12e11

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ui/src/hooks/useExternalToast/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { Storage } from '@/utils';
2828

2929
const toastPortal = document.createElement('div');
3030
toastPortal.style.position = 'fixed';
31-
toastPortal.style.top = '90px';
31+
toastPortal.style.top = '78px';
3232
toastPortal.style.left = '50%';
3333
toastPortal.style.transform = 'translate(-50%, 0)';
3434
toastPortal.style.maxWidth = '100%';
@@ -37,7 +37,7 @@ toastPortal.style.zIndex = '1001';
3737
const setPortalPosition = () => {
3838
const header = document.querySelector('#header');
3939
if (header) {
40-
toastPortal.style.top = `${header.getBoundingClientRect().top + 90}px`;
40+
toastPortal.style.top = `${header.getBoundingClientRect().top + 78}px`;
4141
}
4242
};
4343
const startHandlePortalPosition = () => {

ui/src/hooks/useToast/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import ReactDOM from 'react-dom/client';
2424

2525
const toastPortal = document.createElement('div');
2626
toastPortal.style.position = 'fixed';
27-
toastPortal.style.top = '90px';
27+
toastPortal.style.top = '78px';
2828
toastPortal.style.left = '50%';
2929
toastPortal.style.transform = 'translate(-50%, 0)';
3030
toastPortal.style.maxWidth = '100%';
@@ -33,7 +33,7 @@ toastPortal.style.zIndex = '1001';
3333
const setPortalPosition = () => {
3434
const header = document.querySelector('#header');
3535
if (header) {
36-
toastPortal.style.top = `${header.getBoundingClientRect().top + 90}px`;
36+
toastPortal.style.top = `${header.getBoundingClientRect().top + 78}px`;
3737
}
3838
};
3939
const startHandlePortalPosition = () => {

0 commit comments

Comments
 (0)